Closed Bug 1014503 Opened 6 years ago Closed 6 years ago

running devtools tests via mochitest-browser gives unhelpful error message

Categories

(Testing :: Mochitest, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla32

People

(Reporter: freddyb, Assigned: jmaher)

References

Details

Attachments

(1 file, 1 obsolete file)

Running a devtools test via mochitest-browser (instead of mochitest-devtools) fails to work and the error message is horrible.

e.g.
> ./mach mochitest-browser browser/devtools/webconsole/test/browser_webconsole_bug_1010953_cspro.js ^C


The error I get is:
> TEST-UNEXPECTED-FAIL | (browser-test.js) | No tests to run. Did you pass an invalid --test-path?
Unexpected fallout of the devtools split. I think if you pass a single test we should probably ignore subsuite.
yeah, this should be easy to fix.  good find.
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #8427010 - Flags: review?(ted)
Comment on attachment 8427010 [details] [diff] [review]
ignore subsuite logic if we pass in a test-path pointing to a file (1.0)

Review of attachment 8427010 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/mochitest/runtests.py
@@ +481,5 @@
>          info[k] = v
>  
>        # Bug 883858 - return all tests including disabled tests
> +      testPath = self.getTestPath(options)
> +      cleanedTestPath = os.path.realpath(os.path.join(SCRIPT_DIR, self.getTestFlavor(options).replace('-chrome', ''), testPath))

This feels a little too magical to me. Is it possible to just simplify this to something like "testPath.endswith('.html') or (isBrowserChrome and testPath.endswith('.js'))'?
Attachment #8427010 - Flags: review?(ted)
this should also fix bug 1017676
Attachment #8427010 - Attachment is obsolete: true
Attachment #8431085 - Flags: review?(ted)
Comment on attachment 8431085 [details] [diff] [review]
ignore subsuite and skip-if for a single test case (2.0)

Review of attachment 8431085 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8431085 - Flags: review?(ted) → review+
Duplicate of this bug: 1017676
https://hg.mozilla.org/mozilla-central/rev/1a00dde01343
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.