You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2019/04/04 17:09:16 UTC

[impala] 01/04: Improve error handling for validation of unified backend executable

This is an automated email from the ASF dual-hosted git repository.

tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 2cb93b7ac8cddf36545a7ad764530d443cfd51b5
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Fri Mar 29 16:51:26 2019 -0700

    Improve error handling for validation of unified backend executable
    
    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 <im...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 bin/validate-unified-backend-test-filters.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/bin/validate-unified-backend-test-filters.py b/bin/validate-unified-backend-test-filters.py
index 7a235fd..06621d4 100755
--- a/bin/validate-unified-backend-test-filters.py
+++ b/bin/validate-unified-backend-test-filters.py
@@ -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"):