On Linux, if I run "new-run-webkit-tests --debug --chromium LayoutTests/compositing" then I get the following error: Preparing tests ...Traceback (most recent call last): File "/usr/local/google/home/enne/chrome/src/third_party/WebKit/Tools/Scripts/new-run-webkit-tests", line 38, in <module> sys.exit(run_webkit_tests.main()) File "/usr/local/google/home/enne/chrome/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 430, in main return run(port_obj, options, args) File "/usr/local/google/home/enne/chrome/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py", line 117, in run num_unexpected_results = runner.run(result_summary) File "/usr/local/google/home/enne/chrome/src/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py", line 645, in run assert(len(self._test_files)) AssertionError This does not occur if I run against LayoutTests/fast/canvas/webgl (and any number of other subdirectories). Oddly, if I generate a text list containing all of the html files in the compositing directory (recursively) and then use --test-file to specify it, then I get the same error as above.
This is happening "by design", sort of. You must have lines in your test expectations file that skips the compositing directory. When you list files individually, those skips get overridden. The tool shouldn't crash, though. I'll add a patch to fix that.
Ah, you're quite right. If I add --force, then tests exist and this doesn't occur.
Created attachment 79019 [details] Patch
Note that passing a directory is different than an explicit list of test files because we assume you still want to skip the files that should be skipped in the directory unless told not to. You can also override the skipping by using --force.
(In reply to comment #4) > Note that passing a directory is different than an explicit list of test files because we assume you still want to skip the files that should be skipped in the directory unless told not to. Using --test-list had the same behavior as passing a directory for me. Are you saying that's not intended?
Looks like there might be a separate bug as well ... when you specify arguments on the command line we do you the courtesy of stripping off the "LayoutTests/" prefix. We don't for lines listed in --test-file . So you were getting the same result through a slightly different code path, I think.
(In reply to comment #6) > Looks like there might be a separate bug as well ... when you specify arguments on the command line we do you the courtesy of stripping off the "LayoutTests/" prefix. We don't for lines listed in --test-file . So you were getting the same result through a slightly different code path, I think. I thought we had stopped stripping the LayoutTests/ prefix (http://trac.webkit.org/changeset/71160), for consistency with ORWT.
Comment on attachment 79019 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79019&action=review > Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py:394 > + if not len(self._test_files): Unit test?
(In reply to comment #7) > (In reply to comment #6) > > Looks like there might be a separate bug as well ... when you specify arguments on the command line we do you the courtesy of stripping off the "LayoutTests/" prefix. We don't for lines listed in --test-file . So you were getting the same result through a slightly different code path, I think. > > I thought we had stopped stripping the LayoutTests/ prefix (http://trac.webkit.org/changeset/71160), for consistency with ORWT. That is the aforementioned bug. Ojan fixed it in one place and missed it in the other. I will fix that and add a couple of unit tests.
Created attachment 79030 [details] Patch
(In reply to comment #9) > That is the aforementioned bug. Ojan fixed it in one place and missed it in the other. I will fix that and add a couple of unit tests. Ah, makes sense now. What about a unit test for the original report (that you get a crash if trying to run only skipped tests)?
Comment on attachment 79030 [details] Patch r- to make it clearer that tests for the bug being fixed would be good to have.
Created attachment 79224 [details] update w/ mihaip's feedback, rebase to tip of tree
Committed r76045: <http://trac.webkit.org/changeset/76045>