You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2019/02/26 17:47:45 UTC
[impala] 02/02: IMPALA-8247: Fix tests missing from unified backend
executable
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit e9936b02cf5b9673d6dd8f3624b07e2ec81f763e
Author: Joe McDonnell <jo...@cloudera.com>
AuthorDate: Mon Feb 25 18:10:46 2019 -0800
IMPALA-8247: Fix tests missing from unified backend executable
When converting the tests in be/src/util to the unified backend
test executable in IMPALA-8071, some tests did not get linked
into the executable appropriately. This means that they stopped
running. Specifically, the tests in bit-stream-utils-test.cc
and system-state-info-test.cc were left out.
This adds them back and modifies bin/validate-unified-backend-filters.py
to check both directions:
- If a filter is specified, it must match a test in the executable.
- If the executable has a test, some filter must match it.
I ran the backend tests on debug and ASAN with this change.
Change-Id: I80d8b5779cb0ac663e32c72722e0c73b68a43d2e
Reviewed-on: http://gerrit.cloudera.org:8080/12584
Tested-by: Impala Public Jenkins <im...@cloudera.com>
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
---
be/src/util/CMakeLists.txt | 4 +++-
bin/validate-unified-backend-test-filters.py | 16 ++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/be/src/util/CMakeLists.txt b/be/src/util/CMakeLists.txt
index 08d3111..0a26372 100644
--- a/be/src/util/CMakeLists.txt
+++ b/be/src/util/CMakeLists.txt
@@ -100,6 +100,7 @@ add_library(UtilTests
benchmark-test.cc
bitmap-test.cc
bit-packing-test.cc
+ bit-stream-utils-test.cc
bit-util-test.cc
blocking-queue-test.cc
bloom-filter-test.cc
@@ -129,6 +130,7 @@ add_library(UtilTests
string-util-test.cc
symbols-util-test.cc
sys-info-test.cc
+ system-state-info-test.cc
thread-pool-test.cc
time-test.cc
uid-util-test.cc
@@ -187,7 +189,7 @@ ADD_UNIFIED_BE_LSAN_TEST(redactor-unconfigured-test "RedactorUnconfigTest.*")
ADD_UNIFIED_BE_LSAN_TEST(rle-test "BitArray.*:RleTest.*")
ADD_UNIFIED_BE_LSAN_TEST(runtime-profile-test "CountersTest.*:TimerCounterTest.*:TimeSeriesCounterTest.*:VariousNumbers/TimeSeriesCounterResampleTest.*")
ADD_UNIFIED_BE_LSAN_TEST(string-parser-test "StringToInt.*:StringToIntWithBase.*:StringToFloat.*:StringToBool.*")
-ADD_UNIFIED_BE_LSAN_TEST(string-util-test "TruncateDownTest.*:TruncateUpTest.*:CommandSeparatedContainsTest.*:CommaSeparatedContainsTest.*")
+ADD_UNIFIED_BE_LSAN_TEST(string-util-test "TruncateDownTest.*:TruncateUpTest.*:CommaSeparatedContainsTest.*")
ADD_UNIFIED_BE_LSAN_TEST(symbols-util-test "SymbolsUtil.*")
ADD_UNIFIED_BE_LSAN_TEST(system-state-info-test "SystemStateInfoTest.*")
ADD_UNIFIED_BE_LSAN_TEST(sys-info-test "CpuInfoTest.*:DiskInfoTest.*")
diff --git a/bin/validate-unified-backend-test-filters.py b/bin/validate-unified-backend-test-filters.py
index c872938..62733e9 100755
--- a/bin/validate-unified-backend-test-filters.py
+++ b/bin/validate-unified-backend-test-filters.py
@@ -63,5 +63,21 @@ def main():
options.unified_binary, options.filters))
sys.exit(1)
+ # Check to see if there are any filters that do not match tests in the unified
+ # test executable. This can indicate that a test file is not included appropriately
+ # in the executable. It can also indicate a bogus filter.
+ filters_without_tests = []
+ for test_filter in options.filters.split(":"):
+ if len(test_filter) == 0: continue
+ tests = get_set_of_tests(options.unified_binary, test_filter)
+ if len(tests) == 0:
+ filters_without_tests.append(test_filter)
+ if len(filters_without_tests) > 0:
+ print("FAILED: The following test filters do not match any tests in the\n"
+ "unified test executable. This can indicate that some test has not\n"
+ "been linked appropriately into the test executable:")
+ for test_filter in filters_without_tests:
+ print(test_filter)
+ sys.exit(1)
if __name__ == "__main__": main()