mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
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 <impala-public-jenkins@cloudera.com> Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
This commit is contained in:
@@ -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.*")
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user