From 17fb85f0759feef15ab070c5b27f88d1e24ffe17 Mon Sep 17 00:00:00 2001 From: kmackay Date: Tue, 5 Jul 2016 09:42:13 -0700 Subject: [PATCH] [Chromecast] Fix base_unittests filters for audio-only builds Only the last --gtest_filter arg in the command line is used (any previous instances are ignored), so simply appending the command line won't work. Just specify the entire correct filter for now. BUG= Review-Url: https://codereview.chromium.org/2115003002 Cr-Commit-Position: refs/heads/master@{#403794} --- chromecast/BUILD.gn | 16 +++++++++------- chromecast/tools/build/generate_test_lists.py | 7 +++---- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/chromecast/BUILD.gn b/chromecast/BUILD.gn index dffd5d98acee89..14428d18db8576 100644 --- a/chromecast/BUILD.gn +++ b/chromecast/BUILD.gn @@ -62,12 +62,6 @@ cast_test_group("cast_tests") { # Running a batch of net_unittests has high overhead. Run tests in batches of 25 to reduce number of batches (b/23156294). "net_unittests --gtest_filter=-KeygenHandlerTest.SmokeTest:KeygenHandlerTest.ConcurrencyTest:ProxyScriptFetcherImplTest.HttpMimeType --test-launcher-timeout=90000 --test-launcher-batch-limit=25", - # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509) - # Disable ProcessUtilTest.* (need to define OS_ANDROID) - # Disable StackContainer.BufferAlignment (don't support 16-byte alignment) - # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed) - "base_unittests --gtest_filter=-ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo", - # DesktopCaptureDeviceTest.*: No capture device on Eureka # Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka) # Disable GpuDataManagerImplPrivateTest.SetGLStrings and @@ -96,8 +90,16 @@ cast_test_group("cast_tests") { "url_unittests --gtest_filter=-URLCanonTest.DoAppendUTF8Invalid", ] + # Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509) + # Disable ProcessUtilTest.* (need to define OS_ANDROID) + # Disable StackContainer.BufferAlignment (don't support 16-byte alignment) + # Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed) if (disable_display) { - filters += [ "base_unittests --gtest_filter=-TimeFormattingTest.*" ] + # Also disable TimeFormattingTest on audio-only builds, since we don't + # include the necessary info in icudtl.dat. + filters += [ "base_unittests --gtest_filter=-ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo:TimeFormattingTest.*" ] + } else { + filters += [ "base_unittests --gtest_filter=-ProcessMetricsTest.GetNumberOfThreads:ProcessUtilTest.*:StackContainer.BufferAlignment:SystemMetrics2Test.GetSystemMemoryInfo" ] } } else if (is_cast_desktop_build || target_os == "android") { filters += [ diff --git a/chromecast/tools/build/generate_test_lists.py b/chromecast/tools/build/generate_test_lists.py index c343c69daa12a3..120afd65eeac2a 100755 --- a/chromecast/tools/build/generate_test_lists.py +++ b/chromecast/tools/build/generate_test_lists.py @@ -53,10 +53,9 @@ def CombineList(test_files_dir, list_output_file, include_filters, raise Exception("Filter found for unknown target: " + test_binary_name) - if test_binary_name in test_filters: - test_filters[test_binary_name] += " " + filter - else: - test_filters[test_binary_name] = filter + # Note: This may overwrite a previous rule. This is okay, since higher + # priority files are evaluated after lower priority files. + test_filters[test_binary_name] = filter test_binaries = [ binary + " " + (additional_runtime_options or "")