Reland "Support smoke test file for flag specific suites"
This reverts commit1062afe8a2
. In the previous CL, we have used glob(*) for some paths. Looks that is causing the problem. Removed the trailing '*'s fixed the issue. Reason for revert: <Issue fixed> Original change's description: > Revert "Support smoke test file for flag specific suites" > > This reverts commit27eccdb271
. > > Reason for revert: <Now highdpi step runs 0 tests, revert first to check> > > Original change's description: > > Support smoke test file for flag specific suites > > > > previously we are using test expectations to skip all tests, then > > using test expectations on individual tests to specify which tests > > we want to run on a flag specific suite. This will cause the flag > > specific suite not able to reuse the default test expectations, thus > > requires additional maintaining effort and sometimes cause confusion. > > > > With this change, we allow each flag specific suite to have > > one optional smoke test file to specify what tests to run. > > > > Bug: 1356241 > > Change-Id: Ieb4e67bcf4a13116b745c8c4ad7506f217575f90 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3927975 > > Reviewed-by: Takuto Ikuta <tikuta@chromium.org> > > Commit-Queue: Weizhong Xia <weizhong@google.com> > > Reviewed-by: Preethi Mohan <preethim@google.com> > > Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> > > Cr-Commit-Position: refs/heads/main@{#1055330} > > Bug: 1356241 > Change-Id: Icc6a892f925bad8755317bf0ed6778811d2564ad > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3939132 > Owners-Override: Xianzhu Wang <wangxianzhu@chromium.org> > Commit-Queue: Scott Violet <sky@chromium.org> > Reviewed-by: Scott Violet <sky@chromium.org> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Weizhong Xia <weizhong@google.com> > Auto-Submit: Weizhong Xia <weizhong@google.com> > Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> > Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> > Reviewed-by: Preethi Mohan <preethim@google.com> > Cr-Commit-Position: refs/heads/main@{#1056519} Bug: 1356241 Change-Id: Ib534bf733186d69b7d3c4f85b66a8fb08ac306b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3941244 Reviewed-by: Preethi Mohan <preethim@google.com> Commit-Queue: Weizhong Xia <weizhong@google.com> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Takuto Ikuta <tikuta@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/main@{#1057631}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
fa2ae41a83
commit
42f6f8c110
2
BUILD.gn
2
BUILD.gn
@ -1439,6 +1439,7 @@ if (!is_ios) {
|
||||
"//third_party/blink/web_tests/FlagSpecificConfig",
|
||||
"//third_party/blink/web_tests/FlagExpectations/",
|
||||
"//third_party/blink/web_tests/flag-specific/",
|
||||
"//third_party/blink/web_tests/SmokeTests/",
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1504,6 +1505,7 @@ if (!is_ios) {
|
||||
"//third_party/blink/web_tests/FlagSpecificConfig",
|
||||
"//third_party/blink/web_tests/FlagExpectations/",
|
||||
"//third_party/blink/web_tests/flag-specific/",
|
||||
"//third_party/blink/web_tests/SmokeTests/",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -334,6 +334,7 @@ class Port(object):
|
||||
for config in json_configs:
|
||||
name = config['name']
|
||||
args = config['args']
|
||||
smoke_file = config.get('smoke_file')
|
||||
if not VALID_FILE_NAME_REGEX.match(name):
|
||||
raise ValueError(
|
||||
'{}: name "{}" contains invalid characters'.format(
|
||||
@ -341,11 +342,11 @@ class Port(object):
|
||||
if name in configs:
|
||||
raise ValueError('{} contains duplicated name {}.'.format(
|
||||
config_file, name))
|
||||
if args in configs.values():
|
||||
if args in [x for x, _ in configs.values()]:
|
||||
raise ValueError(
|
||||
'{}: name "{}" has the same args as another entry.'.format(
|
||||
config_file, name))
|
||||
configs[name] = args
|
||||
configs[name] = (args, smoke_file)
|
||||
return configs
|
||||
|
||||
def _specified_additional_driver_flags(self):
|
||||
@ -363,7 +364,7 @@ class Port(object):
|
||||
|
||||
flag_specific_option = self.flag_specific_config_name()
|
||||
if flag_specific_option:
|
||||
flags += self.flag_specific_configs()[flag_specific_option]
|
||||
flags += self.flag_specific_configs()[flag_specific_option][0]
|
||||
|
||||
flags += self.get_option('additional_driver_flag', [])
|
||||
return flags
|
||||
@ -397,9 +398,6 @@ class Port(object):
|
||||
def supports_per_test_timeout(self):
|
||||
return False
|
||||
|
||||
def default_smoke_test_only(self):
|
||||
return False
|
||||
|
||||
def _default_timeout_ms(self):
|
||||
return 6000
|
||||
|
||||
@ -1389,7 +1387,26 @@ class Port(object):
|
||||
smoke_tests = self._tests_from_file(smoke_test_filename)
|
||||
return test not in smoke_tests
|
||||
|
||||
def default_smoke_test_only(self):
|
||||
config_name = self.flag_specific_config_name()
|
||||
if config_name:
|
||||
_, smoke_file = self.flag_specific_configs()[config_name]
|
||||
if smoke_file is None:
|
||||
return False
|
||||
if not self._filesystem.exists(
|
||||
self._filesystem.join(self.web_tests_dir(), smoke_file)):
|
||||
_log.error('Unable to find smoke file(%s) for %s', smoke_file,
|
||||
config_name)
|
||||
return False
|
||||
return True
|
||||
return False
|
||||
|
||||
def path_to_smoke_tests_file(self):
|
||||
config_name = self.flag_specific_config_name()
|
||||
if config_name:
|
||||
_, smoke_file = self.flag_specific_configs()[config_name]
|
||||
return self._filesystem.join(self.web_tests_dir(), smoke_file)
|
||||
|
||||
# Historically we only have one smoke tests list. That one now becomes
|
||||
# the default
|
||||
return self._filesystem.join(self.web_tests_dir(), 'SmokeTests',
|
||||
|
@ -112,11 +112,15 @@ class MacPort(base.Port):
|
||||
|
||||
def default_smoke_test_only(self):
|
||||
# only run platform specific tests on older mac versions
|
||||
return self._version in {'mac10.13', 'mac10.14'}
|
||||
if self._version in {'mac10.13', 'mac10.14'}:
|
||||
return True
|
||||
return super().default_smoke_test_only()
|
||||
|
||||
def path_to_smoke_tests_file(self):
|
||||
return self._filesystem.join(self.web_tests_dir(), 'SmokeTests',
|
||||
'Mac.txt')
|
||||
if self._version in {'mac10.13', 'mac10.14'}:
|
||||
return self._filesystem.join(self.web_tests_dir(), 'SmokeTests',
|
||||
'Mac.txt')
|
||||
return super().path_to_smoke_tests_file()
|
||||
|
||||
def _path_to_driver(self, target=None):
|
||||
return self._build_path_with_target(target,
|
||||
|
2
third_party/blink/tools/run_wpt_tests.py
vendored
2
third_party/blink/tools/run_wpt_tests.py
vendored
@ -161,7 +161,7 @@ class WPTAdapter(wpt_common.BaseWptScriptAdapter):
|
||||
if self.options.flag_specific:
|
||||
configs = self.port.flag_specific_configs()
|
||||
rest_args.extend('--binary-arg=%s' % arg
|
||||
for arg in configs[self.options.flag_specific])
|
||||
for arg in configs[self.options.flag_specific][0])
|
||||
|
||||
if self.options.test_filter:
|
||||
for pattern in self.options.test_filter.split(':'):
|
||||
|
1293
third_party/blink/web_tests/FlagExpectations/highdpi
vendored
1293
third_party/blink/web_tests/FlagExpectations/highdpi
vendored
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,8 @@
|
||||
},
|
||||
{
|
||||
"name": "highdpi",
|
||||
"args": ["--force-device-scale-factor=1.5"]
|
||||
"args": ["--force-device-scale-factor=1.5"],
|
||||
"smoke_file": "SmokeTests/highdpi"
|
||||
},
|
||||
{
|
||||
"name": "skia-vulkan-swiftshader",
|
||||
|
1636
third_party/blink/web_tests/SmokeTests/highdpi
vendored
Normal file
1636
third_party/blink/web_tests/SmokeTests/highdpi
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user