Skip to content

Commit

Permalink
Improve error handling for validation of unified backend executable
Browse files Browse the repository at this point in the history
bin/validate-unified-backend-test-filters.py currently does not
handle the case where the call to run the unified backend test
executable fails. Instead, it produces a very confusing message
about invalid filters that does not mention that the execution
failed.

This checks the return code when running the unified backend
test executable and produces a reasonable message if the
return code is not 0.

Change-Id: Ia84cd074be79bc9d99b0621a1ae216f3debf5833
Reviewed-on: http://gerrit.cloudera.org:8080/12895
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
  • Loading branch information
joemcdonnell authored and Impala Public Jenkins committed Apr 3, 2019
1 parent 5670f96 commit 2cb93b7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bin/validate-unified-backend-test-filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ def get_set_of_tests(unified_binary, filters):
command.append("--gtest_filter={0}".format(filters))
p = subprocess.Popen(command, stdout=subprocess.PIPE)
out, err = p.communicate()
if p.returncode != 0:
print("FAILED: Unified backend test executable returned an error when trying\n"
" to list tests.")
print("Command: {0}".format(" ".join(command)))
print("Return Code: {0}".format(p.returncode))
print("stdout:\n{0}\nstderr:\n{1}".format(out, err))
sys.exit(1)

test_list = set()
cur_test_suite = None
for line in out.split("\n"):
Expand Down

0 comments on commit 2cb93b7

Please sign in to comment.