Update disabled tests (#527)
* Update disabled tests Create a config file which lists the test targets with disabled tests. run_tests script will use this yaml file to determine and add appropriate gtest_filter flags while running tests * Update the patches.yaml file
This commit is contained in:
Родитель
5423a4c5d6
Коммит
c60f4d1391
|
@ -327,12 +327,6 @@ patches:
|
|||
owners: zcbenz
|
||||
file: fix-arm64-linking-error.patch
|
||||
description: Do not use system freetype for arm64
|
||||
-
|
||||
owners: nitsakh
|
||||
file: disable_unittests.patch
|
||||
description: Disabling unit tests
|
||||
GPUTestConfigTest.LoadCurrentConfig test is disabled as it fails
|
||||
on high sierra. It should be updated with newer chromium.
|
||||
-
|
||||
owners: brenca
|
||||
file: disable-redraw-lock.patch
|
||||
|
|
|
@ -237,54 +237,3 @@ index 674b0e9a909c..a1bff6e40f56 100644
|
|||
if (base_computed_style_ && computed_style)
|
||||
DCHECK(*base_computed_style_ == *computed_style);
|
||||
#endif
|
||||
|
||||
Disabling unit tests failing because of the dcheck failure
|
||||
diff --git a/base/memory/weak_ptr_unittest.cc b/base/memory/weak_ptr_unittest.cc
|
||||
index d223bd2bf6d8..eda41c9d9e7f 100644
|
||||
--- a/base/memory/weak_ptr_unittest.cc
|
||||
+++ b/base/memory/weak_ptr_unittest.cc
|
||||
@@ -566,7 +566,7 @@ TEST(WeakPtrTest, NonOwnerThreadCanDeleteWeakPtr) {
|
||||
background.DeleteArrow(arrow);
|
||||
}
|
||||
|
||||
-TEST(WeakPtrDeathTest, WeakPtrCopyDoesNotChangeThreadBinding) {
|
||||
+TEST(WeakPtrDeathTest, DISABLED_WeakPtrCopyDoesNotChangeThreadBinding) {
|
||||
// The default style "fast" does not support multi-threaded tests
|
||||
// (introduces deadlock on Linux).
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
@@ -594,7 +594,7 @@ TEST(WeakPtrDeathTest, WeakPtrCopyDoesNotChangeThreadBinding) {
|
||||
background.DeleteArrow(arrow_copy);
|
||||
}
|
||||
|
||||
-TEST(WeakPtrDeathTest, NonOwnerThreadDereferencesWeakPtrAfterReference) {
|
||||
+TEST(WeakPtrDeathTest, DISABLED_NonOwnerThreadDereferencesWeakPtrAfterReference) {
|
||||
// The default style "fast" does not support multi-threaded tests
|
||||
// (introduces deadlock on Linux).
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
@@ -614,7 +614,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadDereferencesWeakPtrAfterReference) {
|
||||
ASSERT_DCHECK_DEATH(background.DeRef(&arrow));
|
||||
}
|
||||
|
||||
-TEST(WeakPtrDeathTest, NonOwnerThreadDeletesWeakPtrAfterReference) {
|
||||
+TEST(WeakPtrDeathTest, DISABLED_NonOwnerThreadDeletesWeakPtrAfterReference) {
|
||||
// The default style "fast" does not support multi-threaded tests
|
||||
// (introduces deadlock on Linux).
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
@@ -638,7 +638,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadDeletesWeakPtrAfterReference) {
|
||||
background.DeleteTarget(target.release());
|
||||
}
|
||||
|
||||
-TEST(WeakPtrDeathTest, NonOwnerThreadDeletesObjectAfterReference) {
|
||||
+TEST(WeakPtrDeathTest, DISABLED_NonOwnerThreadDeletesObjectAfterReference) {
|
||||
// The default style "fast" does not support multi-threaded tests
|
||||
// (introduces deadlock on Linux).
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
@@ -657,7 +657,7 @@ TEST(WeakPtrDeathTest, NonOwnerThreadDeletesObjectAfterReference) {
|
||||
ASSERT_DCHECK_DEATH(background.DeleteTarget(target.release()));
|
||||
}
|
||||
|
||||
-TEST(WeakPtrDeathTest, NonOwnerThreadReferencesObjectAfterDeletion) {
|
||||
+TEST(WeakPtrDeathTest, DISABLED_NonOwnerThreadReferencesObjectAfterDeletion) {
|
||||
// The default style "fast" does not support multi-threaded tests
|
||||
// (introduces deadlock on Linux).
|
||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/gpu/config/gpu_test_config_unittest.cc b/gpu/config/gpu_test_config_unittest.cc
|
||||
index e42a805b2d8c..41909e5dc1d6 100644
|
||||
--- a/gpu/config/gpu_test_config_unittest.cc
|
||||
+++ b/gpu/config/gpu_test_config_unittest.cc
|
||||
@@ -264,7 +264,7 @@ TEST_F(GPUTestConfigTest, OverlapsWith) {
|
||||
}
|
||||
}
|
||||
|
||||
-TEST_F(GPUTestConfigTest, LoadCurrentConfig) {
|
||||
+TEST_F(GPUTestConfigTest, DISABLED_LoadCurrentConfig) {
|
||||
GPUTestBotConfig config;
|
||||
GPUInfo gpu_info;
|
||||
gpu_info.gpu.vendor_id = 0x10de;
|
|
@ -13,16 +13,3 @@ index a39067db8c52..4a0d69dc3fb5 100644
|
|||
}
|
||||
|
||||
if (did_allow_navigation) {
|
||||
diff --git a/content/browser/frame_host/render_frame_host_impl_browsertest.cc b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
|
||||
index 541d9619b2d8..9842fdc589c4 100644
|
||||
--- a/content/browser/frame_host/render_frame_host_impl_browsertest.cc
|
||||
+++ b/content/browser/frame_host/render_frame_host_impl_browsertest.cc
|
||||
@@ -304,7 +304,7 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
|
||||
// Tests that a gesture is required in a frame before it can request a
|
||||
// beforeunload dialog.
|
||||
IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
|
||||
- BeforeUnloadDialogRequiresGesture) {
|
||||
+ DISABLED_BeforeUnloadDialogRequiresGesture) {
|
||||
WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
|
||||
TestJavaScriptDialogManager dialog_manager;
|
||||
wc->SetDelegate(&dialog_manager);
|
||||
|
|
|
@ -15,17 +15,3 @@ index 0a6b0176a982..35a1c3c11a58 100644
|
|||
|
||||
(*map_type)[key] = value;
|
||||
ResetKeyIterator();
|
||||
|
||||
diff --git a/content/common/dom_storage/dom_storage_map_unittest.cc b/content/common/dom_storage/dom_storage_map_unittest.cc
|
||||
index bad1d7d44f5b..ea35cf6763c7 100644
|
||||
--- a/content/common/dom_storage/dom_storage_map_unittest.cc
|
||||
+++ b/content/common/dom_storage/dom_storage_map_unittest.cc
|
||||
@@ -108,7 +108,7 @@ TEST_P(DOMStorageMapParamTest, DOMStorageMapBasics) {
|
||||
EXPECT_EQ(0u, map->storage_used());
|
||||
}
|
||||
|
||||
-TEST_P(DOMStorageMapParamTest, EnforcesQuota) {
|
||||
+TEST_P(DOMStorageMapParamTest, DISABLED_EnforcesQuota) {
|
||||
const bool has_only_keys = GetParam();
|
||||
const base::string16 kKey = ASCIIToUTF16("test_key");
|
||||
const base::string16 kValue = ASCIIToUTF16("test_value");
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# This file lists all of the disabled tests
|
||||
# It is used by the run_tests script to determine the tests to be excluded
|
||||
# Here's an example of the file contents format:
|
||||
#
|
||||
# test_name:
|
||||
# - exclude_test_filter
|
||||
#
|
||||
# The `test_name` is the test target that's built (same as the test executable name)
|
||||
# The `exclude_test_filter` is the gtest filter pattern that should be applied for
|
||||
# exclusion. All tests matching this pattern will be excluded.
|
||||
|
||||
|
||||
base_unittests:
|
||||
- WeakPtrDeathTest*
|
||||
content_browsertests:
|
||||
- RenderFrameHostImplBrowserTest.BeforeUnloadDialogRequiresGesture
|
||||
gpu_unittests:
|
||||
- GPUTestConfigTest.LoadCurrentConfig
|
||||
content_unittests:
|
||||
- DOMStorageMapParamTest.EnforcesQuota
|
|
@ -6,6 +6,7 @@ import platform
|
|||
import re
|
||||
import sys
|
||||
import subprocess
|
||||
import yaml
|
||||
|
||||
from lib.config import get_output_dir
|
||||
|
||||
|
@ -20,13 +21,13 @@ def GetTestsToRun(args):
|
|||
tests = []
|
||||
if args.only is None:
|
||||
for file_name in os.listdir(build_dir):
|
||||
if file_name in args.exclude:
|
||||
if args.exclude and file_name in args.exclude:
|
||||
continue
|
||||
if re.search(BINARY_TEST_REGEX, file_name):
|
||||
tests.append(os.path.join(build_dir, file_name))
|
||||
else:
|
||||
for test_name in args.only:
|
||||
if test_name in args.exclude:
|
||||
if args.exclude and test_name in args.exclude:
|
||||
continue
|
||||
test_file = os.path.join(build_dir, test_name)
|
||||
if os.path.isfile(test_file):
|
||||
|
@ -37,10 +38,21 @@ def GetTestsToRun(args):
|
|||
|
||||
def RunTests(binary_tests):
|
||||
if binary_tests:
|
||||
disabled_tests_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'disabled-tests.yaml')
|
||||
disabled_tests = {}
|
||||
if os.path.isfile(disabled_tests_path):
|
||||
disabled_tests = yaml.load(file(disabled_tests_path, 'r'))
|
||||
else:
|
||||
print 'No disabled-tests.yaml file found. Not excluding any tests.'
|
||||
results = []
|
||||
for test in binary_tests:
|
||||
test_args = [test]
|
||||
test_name = os.path.basename(test)
|
||||
if disabled_tests and test_name in disabled_tests and disabled_tests[test_name]:
|
||||
exclusion_filter = '-' + ':'.join(disabled_tests[test_name])
|
||||
test_args.append('--gtest_filter=%s' % exclusion_filter)
|
||||
results.append((os.path.basename(test),
|
||||
subprocess.call([test]) == 0))
|
||||
subprocess.call(test_args) == 0))
|
||||
failed = [test
|
||||
for (test, success) in results
|
||||
if not success]
|
||||
|
|
Загрузка…
Ссылка в новой задаче