Closed Bug 429690 Opened 12 years ago Closed 11 years ago
browser tests cannot be run individually
It'd be really useful to be able to run only one test, instead of all the tests in a directory.
OS: Mac OS X → All
Hardware: PC → All
Summary: browser tests cannot be ran individually → browser tests cannot be run individually
Component: Testing → BrowserTest
Product: Core → Testing
QA Contact: testing → browsertest
Version: Trunk → unspecified
This makes --test-path handle a single file. A few other minor changes: - change summary foreground colour to white (easier to read on green or red, I find) - make results div flex (makes it look better in the "no tests" case). This makes text inside it wrap rather than scroll, so add a default window width to avoid that happening in the common case. - have getHTMLLogFromTests and Tester.start support running no tests, and use this when passed an invalid --test-path (with appropriate error message rather than failing silently)
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #352881 - Flags: review?(dtownsend)
Attachment #352881 - Flags: review?(dtownsend) → review+
Comment on attachment 352881 [details] [diff] [review] patch >+ >+ // Invalid testPath... >+ if (!testsDir.exists()) >+ return ; >+ >+ // If we were passed a specific file, run only that test. >+ if (testsDir.isFile() && fileNameRegexp.test(testsDir.leafName)) >+ return [new browserTestFile(requestPath + "/" + gConfig.testPath)]; Make this return an empty array if it is a file but doesn't match the regexp
Went through full&partial browser chrome test runs on Mac and Windows with that patch, it's ready to land.
Does this then work with TEST_FILE when doing top level make mochitest-browser?
Does setting TEST_FILE cause python.py to be invoked with --test-path? If so, probably!
It sure does!
https://hg.mozilla.org/mozilla-central/rev/fe5e6c0bb20c I think I'll probably land this on 1.9.1 and 1.9.0 as well (need to check the status of the harness on 1.9.0, not sure we've been backporting all the fixes).
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
V.Fixed, per bug 472677 comment 6. https://developer.mozilla.org/en/Browser_chrome_tests#section_5 will need to be updated (after branch(es) checkin).
Status: RESOLVED → VERIFIED
(In reply to comment #9) > https://developer.mozilla.org/en/Browser_chrome_tests#section_5 > will need to be updated (after branch(es) checkin). I've updated that document (it was also filled with falsehoods and inaccuracies).
You need to log in before you can comment on or make changes to this bug.