Revert "[blinkpy] Add run_{web,wpt}_tests.py --exclude-test-list
"
This reverts commit 7f02008ce2
.
Reason for revert: <I think we should use a negative test filter instead, otherwise it will not work well with smoke test list.
We can not use two `--test-list` for high_dpi_blink_wpt_tests. Due to test filter has a concept of glob, we can not use the file as both test list and test filter either.
Introduce --inverted-test-launcher-filter-file solved this problem.>
Original change's description:
> [blinkpy] Add `run_{web,wpt}_tests.py --exclude-test-list`
>
> During the migration to wptrunner, this will let Chromium CI use the
> same file to skip tests in one suite, and run them in another via the
> symmetric `--test-list`.
>
> `--exclude-test-list` is similar to `--isolated-script-test-filter-file`
> with every line negated, but the former must contain valid test
> (directories), not just prefixes, and cannot contain negative terms.
>
> Bug: 328079854
> Change-Id: I090a59810fc3fcccd6a2f365bc24c646c85df118
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5760676
> Reviewed-by: Weizhong Xia <weizhong@google.com>
> Commit-Queue: Jonathan Lee <jonathanjlee@google.com>
> Cr-Commit-Position: refs/heads/main@{#1337398}
Bug: 328079854
Change-Id: I75129ee31cc792321657a55ab1310b70ecfa608c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5799817
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Weizhong Xia <weizhong@google.com>
Reviewed-by: Brian Sheedy <bsheedy@chromium.org>
Reviewed-by: Jonathan Lee <jonathanjlee@google.com>
Cr-Commit-Position: refs/heads/main@{#1345308}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2543704e29
commit
6994f47722
BUILD.gn
infra/config
generated
builders
ci
Linux Builder (dbg)
targets
Linux Tests (dbg)(1)
targets
linux-blink-web-tests-force-accessibility-rel
targets
try
linux-blink-web-tests-force-accessibility-rel
targets
linux_chromium_compile_dbg_ng
targets
linux_chromium_dbg_ng
targets
testing
targets
testing/buildbot
chromium.build.fyi.jsonchromium.cft.jsonchromium.clang.jsonchromium.coverage.jsonchromium.fyi.jsonchromium.linux.jsonchromium.mac.jsonchromium.memory.jsonchromium.win.jsonclient.v8.fyi.jsontest_suites.pyltryserver.blink.jsontryserver.chromium.linux.jsontryserver.v8.json
third_party/blink
tools
blinkpy
web_tests
wpt_tests
web_tests
TestLists
2
BUILD.gn
2
BUILD.gn
@ -1513,7 +1513,7 @@ if (use_blink && !is_cronet_build) {
|
|||||||
# Use --wpt-only to skip tests under web_tests/virtual/
|
# Use --wpt-only to skip tests under web_tests/virtual/
|
||||||
args += [
|
args += [
|
||||||
"--wpt-only",
|
"--wpt-only",
|
||||||
"--exclude-test-list=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
"--inverted-test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
||||||
]
|
]
|
||||||
|
|
||||||
data_deps = [
|
data_deps = [
|
||||||
|
@ -1295,7 +1295,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1290,7 +1290,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
||||||
"--flag-specific=force-renderer-accessibility"
|
"--flag-specific=force-renderer-accessibility"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
|
@ -121,7 +121,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
||||||
"--flag-specific=force-renderer-accessibility"
|
"--flag-specific=force-renderer-accessibility"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
|
@ -1295,7 +1295,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1295,7 +1295,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1644,7 +1644,7 @@
|
|||||||
'has_native_resultdb_integration',
|
'has_native_resultdb_integration',
|
||||||
],
|
],
|
||||||
'args': [
|
'args': [
|
||||||
'--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
'--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
||||||
],
|
],
|
||||||
'swarming': {
|
'swarming': {
|
||||||
'shards': 1,
|
'shards': 1,
|
||||||
@ -1889,7 +1889,7 @@
|
|||||||
'has_native_resultdb_integration',
|
'has_native_resultdb_integration',
|
||||||
],
|
],
|
||||||
'args': [
|
'args': [
|
||||||
'--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
'--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
||||||
],
|
],
|
||||||
'swarming': {
|
'swarming': {
|
||||||
'shards': 1,
|
'shards': 1,
|
||||||
|
@ -529,7 +529,7 @@ targets.tests.isolated_script_test(
|
|||||||
"has_native_resultdb_integration",
|
"has_native_resultdb_integration",
|
||||||
],
|
],
|
||||||
args = [
|
args = [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1393,7 +1393,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
|
@ -1379,7 +1379,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -3227,7 +3227,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -5148,7 +5148,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
|
@ -329,7 +329,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -832,7 +832,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1274,7 +1274,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -20607,7 +20607,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
|
@ -38997,7 +38997,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -39083,7 +39083,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -42501,7 +42501,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -46949,7 +46949,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
|
@ -1533,7 +1533,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -2157,7 +2157,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1395,7 +1395,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -3060,7 +3060,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -4725,7 +4725,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -22279,7 +22279,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -23866,7 +23866,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"ci_only": true,
|
"ci_only": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -25463,7 +25463,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"ci_only": true,
|
"ci_only": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -27126,7 +27126,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"ci_only": true,
|
"ci_only": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -28747,7 +28747,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -30313,7 +30313,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -10708,7 +10708,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -10804,7 +10804,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -10903,7 +10903,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter",
|
||||||
"--additional-expectations",
|
"--additional-expectations",
|
||||||
"../../third_party/blink/web_tests/MSANExpectations"
|
"../../third_party/blink/web_tests/MSANExpectations"
|
||||||
],
|
],
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1917,7 +1917,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -3694,7 +3694,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -5568,7 +5568,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"isolate_profile_data": true,
|
"isolate_profile_data": true,
|
||||||
"merge": {
|
"merge": {
|
||||||
@ -7471,7 +7471,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -9263,7 +9263,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -11106,7 +11106,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1908,7 +1908,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -2010,7 +2010,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -2114,7 +2114,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -2219,7 +2219,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -2306,7 +2306,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -1644,7 +1644,7 @@
|
|||||||
'has_native_resultdb_integration',
|
'has_native_resultdb_integration',
|
||||||
],
|
],
|
||||||
'args': [
|
'args': [
|
||||||
'--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
'--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
||||||
],
|
],
|
||||||
'swarming': {
|
'swarming': {
|
||||||
'shards': 1,
|
'shards': 1,
|
||||||
@ -1889,7 +1889,7 @@
|
|||||||
'has_native_resultdb_integration',
|
'has_native_resultdb_integration',
|
||||||
],
|
],
|
||||||
'args': [
|
'args': [
|
||||||
'--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
'--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter',
|
||||||
],
|
],
|
||||||
'swarming': {
|
'swarming': {
|
||||||
'shards': 1,
|
'shards': 1,
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -315,7 +315,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -403,7 +403,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -491,7 +491,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -579,7 +579,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -665,7 +665,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -751,7 +751,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -837,7 +837,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -923,7 +923,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1009,7 +1009,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1095,7 +1095,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1181,7 +1181,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1269,7 +1269,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
@ -1356,7 +1356,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"args": [
|
"args": [
|
||||||
"--test-list=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
"--test-launcher-filter-file=../../third_party/blink/web_tests/TestLists/chrome.filter"
|
||||||
],
|
],
|
||||||
"merge": {
|
"merge": {
|
||||||
"args": [
|
"args": [
|
||||||
|
@ -324,8 +324,9 @@ class Manager(object):
|
|||||||
return self._finder.find_tests(
|
return self._finder.find_tests(
|
||||||
args,
|
args,
|
||||||
test_lists=self._options.test_list,
|
test_lists=self._options.test_list,
|
||||||
exclude_test_lists=self._options.exclude_test_lists,
|
|
||||||
filter_files=self._options.isolated_script_test_filter_file,
|
filter_files=self._options.isolated_script_test_filter_file,
|
||||||
|
inverted_filter_files=self._options.
|
||||||
|
inverted_test_launcher_filter_file,
|
||||||
fastest_percentile=self._options.fastest,
|
fastest_percentile=self._options.fastest,
|
||||||
filters=self._options.isolated_script_test_filter)
|
filters=self._options.isolated_script_test_filter)
|
||||||
|
|
||||||
|
@ -53,56 +53,48 @@ class WebTestFinder(object):
|
|||||||
self,
|
self,
|
||||||
args,
|
args,
|
||||||
test_lists=None,
|
test_lists=None,
|
||||||
exclude_test_lists=None,
|
|
||||||
filter_files=None,
|
filter_files=None,
|
||||||
|
inverted_filter_files=None,
|
||||||
fastest_percentile=None,
|
fastest_percentile=None,
|
||||||
filters=None,
|
filters=None,
|
||||||
):
|
):
|
||||||
# The second entry of each element is true if the path is to be
|
filters = filters or []
|
||||||
# included, and false if excluded.
|
paths = self._strip_test_dir_prefixes(args)
|
||||||
paths = [(path, True) for path in self._strip_test_dir_prefixes(args)]
|
|
||||||
if test_lists:
|
if test_lists:
|
||||||
new_paths = self._read_test_list_files(
|
new_paths = self._read_test_list_files(
|
||||||
test_lists, self._port.TEST_PATH_SEPARATOR)
|
test_lists, self._port.TEST_PATH_SEPARATOR)
|
||||||
paths.extend((path, True) for path in new_paths)
|
new_paths = [
|
||||||
|
self._strip_test_dir_prefix(new_path) for new_path in new_paths
|
||||||
|
]
|
||||||
|
paths += new_paths
|
||||||
|
|
||||||
all_tests = []
|
all_tests = []
|
||||||
if not paths or fastest_percentile:
|
if not paths or fastest_percentile:
|
||||||
all_tests = self._port.tests(None)
|
all_tests = self._port.tests(None)
|
||||||
|
|
||||||
test_files = set()
|
path_tests = []
|
||||||
|
if paths:
|
||||||
|
path_tests = self._port.tests(paths)
|
||||||
|
|
||||||
|
test_files = None
|
||||||
running_all_tests = False
|
running_all_tests = False
|
||||||
if fastest_percentile:
|
if fastest_percentile:
|
||||||
times_trie = self._times_trie()
|
times_trie = self._times_trie()
|
||||||
if times_trie:
|
if times_trie:
|
||||||
fastest_tests = self._fastest_tests(times_trie, all_tests,
|
fastest_tests = self._fastest_tests(times_trie, all_tests,
|
||||||
fastest_percentile)
|
fastest_percentile)
|
||||||
test_files.update(fastest_tests)
|
test_files = list(set(fastest_tests).union(path_tests))
|
||||||
else:
|
else:
|
||||||
_log.warning(
|
_log.warning(
|
||||||
'Running all the tests the first time to generate timing data.'
|
'Running all the tests the first time to generate timing data.'
|
||||||
)
|
)
|
||||||
|
test_files = all_tests
|
||||||
running_all_tests = True
|
running_all_tests = True
|
||||||
|
elif paths:
|
||||||
|
test_files = path_tests
|
||||||
else:
|
else:
|
||||||
running_all_tests = not paths and not test_lists
|
test_files = all_tests
|
||||||
|
running_all_tests = True
|
||||||
if running_all_tests:
|
|
||||||
test_files.update(all_tests)
|
|
||||||
|
|
||||||
if exclude_test_lists:
|
|
||||||
new_paths = self._read_test_list_files(
|
|
||||||
exclude_test_lists, self._port.TEST_PATH_SEPARATOR)
|
|
||||||
paths.extend((path, False) for path in new_paths)
|
|
||||||
if new_paths:
|
|
||||||
running_all_tests = False
|
|
||||||
|
|
||||||
for path, include in sorted(paths):
|
|
||||||
path_tests = self._port.tests([path])
|
|
||||||
if include:
|
|
||||||
test_files.update(path_tests)
|
|
||||||
else:
|
|
||||||
test_files -= set(path_tests)
|
|
||||||
test_files = sorted(test_files)
|
|
||||||
|
|
||||||
all_filters = []
|
all_filters = []
|
||||||
if filters:
|
if filters:
|
||||||
@ -111,13 +103,16 @@ class WebTestFinder(object):
|
|||||||
file_filters = self._read_filter_files(
|
file_filters = self._read_filter_files(
|
||||||
filter_files, self._port.TEST_PATH_SEPARATOR)
|
filter_files, self._port.TEST_PATH_SEPARATOR)
|
||||||
all_filters = all_filters + file_filters
|
all_filters = all_filters + file_filters
|
||||||
|
if inverted_filter_files:
|
||||||
|
file_filters = self._read_filter_files(
|
||||||
|
inverted_filter_files, self._port.TEST_PATH_SEPARATOR)
|
||||||
|
all_filters = all_filters + self._invert_filters(file_filters)
|
||||||
|
|
||||||
test_files = filter_tests(test_files, all_filters)
|
test_files = filter_tests(test_files, all_filters)
|
||||||
|
|
||||||
# de-dupe the test list and paths here before running them.
|
# de-dupe the test list and paths here before running them.
|
||||||
test_files = list(OrderedDict.fromkeys(test_files))
|
test_files = list(OrderedDict.fromkeys(test_files))
|
||||||
paths = list(
|
paths = list(OrderedDict.fromkeys(paths))
|
||||||
OrderedDict.fromkeys(path for path, include in paths if include))
|
|
||||||
return (paths, test_files, running_all_tests)
|
return (paths, test_files, running_all_tests)
|
||||||
|
|
||||||
def _times_trie(self):
|
def _times_trie(self):
|
||||||
@ -194,6 +189,20 @@ class WebTestFinder(object):
|
|||||||
raise
|
raise
|
||||||
return filters
|
return filters
|
||||||
|
|
||||||
|
def _invert_filters(self, filters):
|
||||||
|
inverted_filters = []
|
||||||
|
for terms in filters:
|
||||||
|
inverted_filter = []
|
||||||
|
for term in terms:
|
||||||
|
if term.startswith('-'):
|
||||||
|
inverted_filter.append(term[1:])
|
||||||
|
elif term.startswith('+'):
|
||||||
|
inverted_filter.append('-' + term[1:])
|
||||||
|
else:
|
||||||
|
inverted_filter.append('-' + term)
|
||||||
|
inverted_filters.append(inverted_filter)
|
||||||
|
return inverted_filters
|
||||||
|
|
||||||
def _read_test_list_files(self, filenames, test_path_separator):
|
def _read_test_list_files(self, filenames, test_path_separator):
|
||||||
fs = self._filesystem
|
fs = self._filesystem
|
||||||
positive_matches = []
|
positive_matches = []
|
||||||
@ -210,13 +219,11 @@ class WebTestFinder(object):
|
|||||||
_log.debug(
|
_log.debug(
|
||||||
'test-list %s contains a negative filter %s' %
|
'test-list %s contains a negative filter %s' %
|
||||||
(filename, line))
|
(filename, line))
|
||||||
continue
|
positive_matches.append(line)
|
||||||
positive_matches.append(self._strip_test_dir_prefix(line))
|
|
||||||
except IOError as error:
|
except IOError as error:
|
||||||
if error.errno == errno.ENOENT:
|
if error.errno == errno.ENOENT:
|
||||||
_log.critical('')
|
_log.critical('')
|
||||||
_log.critical('--(exclude-)test-list file "%s" not found',
|
_log.critical('--test-list file "%s" not found', filename)
|
||||||
filename)
|
|
||||||
raise
|
raise
|
||||||
return positive_matches
|
return positive_matches
|
||||||
|
|
||||||
@ -371,9 +378,9 @@ def filter_tests(tests, filters):
|
|||||||
else:
|
else:
|
||||||
return (len(k), k)
|
return (len(k), k)
|
||||||
|
|
||||||
for filter in filters:
|
for terms in filters:
|
||||||
# Validate the filter
|
# Validate the filter
|
||||||
for term in filter:
|
for term in terms:
|
||||||
if (term.startswith('-') and not term[1:]) or not term:
|
if (term.startswith('-') and not term[1:]) or not term:
|
||||||
raise ValueError('Empty filter entry "%s"' % (term, ))
|
raise ValueError('Empty filter entry "%s"' % (term, ))
|
||||||
for i, c in enumerate(term):
|
for i, c in enumerate(term):
|
||||||
@ -383,13 +390,13 @@ def filter_tests(tests, filters):
|
|||||||
raise ValueError('Bad test filter "%s" specified; '
|
raise ValueError('Bad test filter "%s" specified; '
|
||||||
'unescaped wildcards are only allowed at '
|
'unescaped wildcards are only allowed at '
|
||||||
'the end' % (term, ))
|
'the end' % (term, ))
|
||||||
if term.startswith('-') and term[1:] in filter:
|
if term.startswith('-') and term[1:] in terms:
|
||||||
raise ValueError('Both "%s" and "%s" specified in test '
|
raise ValueError('Both "%s" and "%s" specified in test '
|
||||||
'filter' % (term, term[1:]))
|
'filter' % (term, term[1:]))
|
||||||
|
|
||||||
# Separate the negative/positive globless terms and glob terms
|
# Separate the negative/positive globless terms and glob terms
|
||||||
include_by_default = all(term.startswith('-') for term in filter)
|
include_by_default = all(term.startswith('-') for term in terms)
|
||||||
exact_neg_terms, exact_pos_terms, glob_terms = _extract_terms(filter)
|
exact_neg_terms, exact_pos_terms, glob_terms = _extract_terms(terms)
|
||||||
|
|
||||||
filtered_tests = []
|
filtered_tests = []
|
||||||
for test in tests:
|
for test in tests:
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
import textwrap
|
|
||||||
import unittest
|
import unittest
|
||||||
from unittest import mock
|
|
||||||
|
|
||||||
from blinkpy.common.host_mock import MockHost
|
from blinkpy.common.host_mock import MockHost
|
||||||
from blinkpy.common.system.filesystem_mock import MockFileSystem
|
from blinkpy.common.system.filesystem_mock import MockFileSystem
|
||||||
@ -155,6 +153,8 @@ class WebTestFinderTests(unittest.TestCase):
|
|||||||
port = host.port_factory.get('test-win-win7', None)
|
port = host.port_factory.get('test-win-win7', None)
|
||||||
|
|
||||||
all_tests = [
|
all_tests = [
|
||||||
|
'path/test.html',
|
||||||
|
'new/test.html',
|
||||||
'fast/css/1.html',
|
'fast/css/1.html',
|
||||||
'fast/css/2.html',
|
'fast/css/2.html',
|
||||||
'fast/css/3.html',
|
'fast/css/3.html',
|
||||||
@ -163,8 +163,6 @@ class WebTestFinderTests(unittest.TestCase):
|
|||||||
'fast/css/skip3.html',
|
'fast/css/skip3.html',
|
||||||
'fast/css/skip4.html',
|
'fast/css/skip4.html',
|
||||||
'fast/css/skip5.html',
|
'fast/css/skip5.html',
|
||||||
'new/test.html',
|
|
||||||
'path/test.html',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
port.tests = lambda paths: paths or all_tests
|
port.tests = lambda paths: paths or all_tests
|
||||||
@ -289,85 +287,31 @@ class WebTestFinderTests(unittest.TestCase):
|
|||||||
set(tests[1]),
|
set(tests[1]),
|
||||||
set(['path/test.html','virtual/path/test.html',]))
|
set(['path/test.html','virtual/path/test.html',]))
|
||||||
|
|
||||||
def test_empty_test_list_find_tests(self):
|
def test_inverted_test_filter_find_tests(self):
|
||||||
host = MockHost()
|
|
||||||
port = host.port_factory.get('test-win-win7')
|
|
||||||
host.filesystem.write_text_file(
|
|
||||||
'test-list.txt',
|
|
||||||
textwrap.dedent("""\
|
|
||||||
# this file is deliberately empty to signal no tests to run
|
|
||||||
"""))
|
|
||||||
all_tests = [
|
|
||||||
'path/test.html',
|
|
||||||
]
|
|
||||||
|
|
||||||
finder = web_test_finder.WebTestFinder(port, {})
|
|
||||||
with mock.patch.object(port, 'tests',
|
|
||||||
lambda paths: paths or all_tests):
|
|
||||||
paths, all_test_names, running_all_tests = finder.find_tests(
|
|
||||||
args=[], test_lists=['test-list.txt'])
|
|
||||||
|
|
||||||
self.assertEqual(paths, [])
|
|
||||||
self.assertEqual(all_test_names, [])
|
|
||||||
self.assertFalse(running_all_tests)
|
|
||||||
|
|
||||||
def test_exclude_test_list_find_tests(self):
|
|
||||||
host = MockHost()
|
host = MockHost()
|
||||||
port = host.port_factory.get('test-win-win7', None)
|
port = host.port_factory.get('test-win-win7', None)
|
||||||
host.filesystem.write_text_file(
|
mock_files = {
|
||||||
'test-list.txt',
|
'test-list.txt': 'path/test.html\nvirtual/path/test.html',
|
||||||
textwrap.dedent("""\
|
'inverted-filter.txt': 'path/test.html'
|
||||||
path/test.html
|
}
|
||||||
"""))
|
host.filesystem = MockFileSystem(files=mock_files)
|
||||||
all_tests = [
|
|
||||||
|
port_tests = [
|
||||||
'path/test.html',
|
'path/test.html',
|
||||||
'virtual/fake-vts/path/test.html',
|
'not/in/test/list.html',
|
||||||
]
|
]
|
||||||
|
|
||||||
finder = web_test_finder.WebTestFinder(port, {})
|
port.tests = lambda paths: paths or port_tests
|
||||||
with mock.patch.object(port, 'tests',
|
|
||||||
lambda paths: paths or all_tests):
|
|
||||||
paths, all_test_names, running_all_tests = finder.find_tests(
|
|
||||||
args=[], exclude_test_lists=['test-list.txt'])
|
|
||||||
|
|
||||||
self.assertEqual(paths, [])
|
|
||||||
self.assertEqual(set(all_test_names),
|
|
||||||
{'virtual/fake-vts/path/test.html'})
|
|
||||||
self.assertFalse(running_all_tests)
|
|
||||||
|
|
||||||
def test_include_and_exclude_test_list_find_tests(self):
|
|
||||||
host = MockHost()
|
|
||||||
port = host.port_factory.get('test-win-win7', None)
|
|
||||||
fs = host.filesystem
|
|
||||||
fs.write_text_file(
|
|
||||||
'include.txt',
|
|
||||||
textwrap.dedent("""\
|
|
||||||
http/tests
|
|
||||||
failures/flaky
|
|
||||||
"""))
|
|
||||||
fs.write_text_file(
|
|
||||||
'exclude.txt',
|
|
||||||
textwrap.dedent("""\
|
|
||||||
http/tests/passes # excludes two tests
|
|
||||||
|
|
||||||
# these lines should have no effect
|
|
||||||
passes/skipped
|
|
||||||
failures
|
|
||||||
"""))
|
|
||||||
|
|
||||||
finder = web_test_finder.WebTestFinder(port, {})
|
finder = web_test_finder.WebTestFinder(port, {})
|
||||||
paths, all_test_names, running_all_tests = finder.find_tests(
|
|
||||||
|
tests = finder.find_tests(
|
||||||
args=[],
|
args=[],
|
||||||
test_lists=['include.txt'],
|
test_lists=['test-list.txt'],
|
||||||
exclude_test_lists=['exclude.txt'])
|
inverted_filter_files=['inverted-filter.txt'])
|
||||||
|
self.assertEqual(set(tests[1]), set([
|
||||||
self.assertEqual(set(paths), {'http/tests', 'failures/flaky'})
|
'virtual/path/test.html',
|
||||||
self.assertEqual(set(all_test_names), {
|
]))
|
||||||
'http/tests/ssl/text.html',
|
|
||||||
'failures/flaky/text.html',
|
|
||||||
})
|
|
||||||
self.assertFalse(running_all_tests)
|
|
||||||
|
|
||||||
|
|
||||||
class FilterTestsTests(unittest.TestCase):
|
class FilterTestsTests(unittest.TestCase):
|
||||||
simple_test_filter = ['a/a1.html', 'a/a2.html', 'b/b1.html']
|
simple_test_filter = ['a/a1.html', 'a/a2.html', 'b/b1.html']
|
||||||
|
@ -452,13 +452,10 @@ def add_testing_options_group(parser: argparse.ArgumentParser,
|
|||||||
metavar='FILE',
|
metavar='FILE',
|
||||||
help='read filters for tests to run')
|
help='read filters for tests to run')
|
||||||
testing_group.add_argument(
|
testing_group.add_argument(
|
||||||
'--exclude-test-list',
|
'--inverted-test-launcher-filter-file',
|
||||||
dest='exclude_test_lists',
|
|
||||||
action='append',
|
action='append',
|
||||||
metavar='FILE',
|
metavar='FILE',
|
||||||
help=('read test (directories) that should not run '
|
help=('Filters in the file will be inverted before applied.'))
|
||||||
'(the most specific prefix among `--(exclude-)test-list` and '
|
|
||||||
'the positional arguments wins)'))
|
|
||||||
testing_group.add_argument(
|
testing_group.add_argument(
|
||||||
'--isolated-script-test-filter-file',
|
'--isolated-script-test-filter-file',
|
||||||
'--test-launcher-filter-file',
|
'--test-launcher-filter-file',
|
||||||
|
@ -183,15 +183,10 @@ def _set_up_derived_options(port, options, args):
|
|||||||
port.host.filesystem.abspath(path))
|
port.host.filesystem.abspath(path))
|
||||||
options.additional_platform_directory = additional_platform_directories
|
options.additional_platform_directory = additional_platform_directories
|
||||||
|
|
||||||
# Do not set has_explicit_tests to true when exclude_test_lists is provided.
|
if not args and not options.test_list and options.smoke is None:
|
||||||
# For builders with an implicit smoke test list, e.g. highdpi flag specific
|
|
||||||
# builder, the smoke test list should always be honored, no matter
|
|
||||||
# exclude_test_lists exists or not.
|
|
||||||
has_explicit_tests = args or options.test_list
|
|
||||||
if not has_explicit_tests and options.smoke is None:
|
|
||||||
options.smoke = port.default_smoke_test_only()
|
options.smoke = port.default_smoke_test_only()
|
||||||
if options.smoke:
|
if options.smoke:
|
||||||
if not has_explicit_tests and options.num_retries is None:
|
if not args and not options.test_list and options.num_retries is None:
|
||||||
# Retry failures 3 times if we're running a smoke test without
|
# Retry failures 3 times if we're running a smoke test without
|
||||||
# additional tests. SmokeTests is an explicit list of tests, so we
|
# additional tests. SmokeTests is an explicit list of tests, so we
|
||||||
# wouldn't retry by default without this special case.
|
# wouldn't retry by default without this special case.
|
||||||
|
@ -398,8 +398,9 @@ class WPTAdapter:
|
|||||||
self.paths, all_test_names, _ = finder.find_tests(
|
self.paths, all_test_names, _ = finder.find_tests(
|
||||||
self.paths,
|
self.paths,
|
||||||
test_lists=self.options.test_list,
|
test_lists=self.options.test_list,
|
||||||
exclude_test_lists=self.options.exclude_test_lists,
|
|
||||||
filter_files=self.options.isolated_script_test_filter_file,
|
filter_files=self.options.isolated_script_test_filter_file,
|
||||||
|
inverted_filter_files=self.options.
|
||||||
|
inverted_test_launcher_filter_file,
|
||||||
fastest_percentile=None,
|
fastest_percentile=None,
|
||||||
filters=self.options.isolated_script_test_filter)
|
filters=self.options.isolated_script_test_filter)
|
||||||
except IOError:
|
except IOError:
|
||||||
|
@ -8,4 +8,4 @@
|
|||||||
# https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/run_web_platform_tests.md
|
# https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/run_web_platform_tests.md
|
||||||
|
|
||||||
# crbug.com/336866597 set_spc_transaction_mode not implemented for content shell
|
# crbug.com/336866597 set_spc_transaction_mode not implemented for content shell
|
||||||
external/wpt/secure-payment-confirmation/
|
external/wpt/secure-payment-confirmation/*
|
||||||
|
Reference in New Issue
Block a user