Skip to content

Commit

Permalink
[Chromecast] Fix base_unittests filters for audio-only builds
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
kmackay authored and Commit bot committed Jul 5, 2016
1 parent 1266751 commit 17fb85f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
16 changes: 9 additions & 7 deletions chromecast/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 += [
Expand Down
7 changes: 3 additions & 4 deletions chromecast/tools/build/generate_test_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Expand Down

0 comments on commit 17fb85f

Please sign in to comment.