Open Bug 1268970 Opened 9 years ago Updated 3 years ago

All mochitests fail with: IOError: [Errno 2] No such file or directory: u'c:/t1/hg/comm-central/mozilla/obj-i686-pc-mingw32\\_tests\\testing\\mochitest\\runtests.py'

Categories

(Testing :: Mochitest, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: philip.chee, Unassigned)

Details

Attachments

(1 file)

Philip@lenovo-PC /c/t1/hg/comm-central $ TEST_PATH=suite/browser/test/browser/browser_bug561636.js mozmake -C ../objdir-sm/ mochitest mozmake: Entering directory 'c:/t1/hg/objdir-sm' browser-chrome process_begin: CreateProcess(NULL, browser-chrome, ...) failed. make (e=2): The system cannot find the file specified. c:/t1/hg/comm-central/mozilla/../suite/build.mk:34: recipe for target 'mochitest-browser-chrome' failed mozmake: [mochitest-browser-chrome] Error 2 (ignored) grep: mochitest-browser-chrome.log: No such file or directory mozmake: Leaving directory 'c:/t1/hg/objdir-sm' Philip@lenovo-PC /c/t1/hg/comm-central $ mozmake -C ../objdir-sm/ mochitest-browser-chrome mozmake: Entering directory 'c:/t1/hg/objdir-sm' browser-chrome process_begin: CreateProcess(NULL, browser-chrome, ...) failed. make (e=2): The system cannot find the file specified. c:/t1/hg/comm-central/mozilla/../suite/build.mk:34: recipe for target 'mochitest-browser-chrome' failed mozmake: [mochitest-browser-chrome] Error 2 (ignored) grep: mochitest-browser-chrome.log: No such file or directory mozmake: Leaving directory 'c:/t1/hg/objdir-sm' Philip@lenovo-PC /c/t1/hg/comm-central $ mozilla/mach mochitest -f browser --subsuite devtools Error running mach: ['mochitest', '-f', 'browser', '--subsuite', 'devtools'] The error occurred in mach itself. This is likely a bug in mach itself or a fundamental problem with a loaded module. Please consider filing a bug against mach by going to the URL: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=mach If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: IOError: [Errno 2] No such file or directory: u'c:/t1/hg/comm-central/mozilla/obj-i686-pc-mingw32\\_tests\\testing\\moch itest\\runtests.py' File "c:\t1\hg\comm-central\mozilla\python/mach\mach\main.py", line 343, in run return self._run(argv) File "c:\t1\hg\comm-central\mozilla\python/mach\mach\main.py", line 395, in _run args = parser.parse_args(argv) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1701, in parse_args args, argv = self.parse_known_args(args, namespace) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1733, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1921, in _parse_known_args positionals_end_index = consume_positionals(start_index) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1898, in consume_positionals take_action(action, args) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1807, in take_action action(self, namespace, argument_values, option_string) File "c:\t1\hg\comm-central\mozilla\python/mach\mach\dispatcher.py", line 173, in __call__ if handler.parser: File "c:\t1\hg\comm-central\mozilla\python/mach\mach\decorators.py", line 77, in parser self._parser = self._parser() File "c:\t1\hg\comm-central\mozilla\testing/mochitest/mach_commands.py", line 310, in setup_argument_parser with open(path, 'r') as fh:
The first part of your bug report is WONTFIX because we removed the mochitest make targets in bug 1248658. The 2nd part with mach failing looks like comm-central foo :/
Component: mach → Mochitest
Product: Core → Testing
So what's the mach equivalent for: > TEST_PATH=suite/browser/test/browser/browser_bug561636.js mozmake -C ../objdir-sm/ mochitest-browser-chrome
Flags: needinfo?(gps)
`mach mochitest path/to/test`
Flags: needinfo?(gps)
Philip@lenovo-PC /c/t1/hg/comm-central $ mozilla/mach mochitest suite/browser/test/browser/browser_urlbarCopying.js Error running mach: ['mochitest', 'suite/browser/test/browser/browser_urlbarCopying.js'] The error occurred in mach itself. This is likely a bug in mach itself or a fundamental problem with a loaded module. Please consider filing a bug against mach by going to the URL: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=mach If filing a bug, please include the full output of mach, including this error message. The details of the failure are as follows: IOError: [Errno 2] No such file or directory: u'c:/t1/hg/comm-central/mozilla/obj-i686-pc-mingw32\\_tests\\testing\\mochitest\\runtests.py' File "c:\t1\hg\comm-central\mozilla\python/mach\mach\main.py", line 343, in run return self._run(argv) File "c:\t1\hg\comm-central\mozilla\python/mach\mach\main.py", line 395, in _run args = parser.parse_args(argv) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1701, in parse_args args, argv = self.parse_known_args(args, namespace) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1733, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1942, in _parse_known_args stop_index = consume_positionals(start_index) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1898, in consume_positionals take_action(action, args) File "c:\DEV\mozilla-build\python\lib\argparse.py", line 1807, in take_action action(self, namespace, argument_values, option_string) File "c:\t1\hg\comm-central\mozilla\python/mach\mach\dispatcher.py", line 173, in __call__ if handler.parser: File "c:\t1\hg\comm-central\mozilla\python/mach\mach\decorators.py", line 77, in parser self._parser = self._parser() File "c:\t1\hg\comm-central\mozilla\testing/mochitest/mach_commands.py", line 310, in setup_argument_parser with open(path, 'r') as fh:
OS: Unspecified → All
Priority: -- → P2
Hardware: Unspecified → All
Summary: Cannot run any mochitest at all → All mochitests fail with: IOError: [Errno 2] No such file or directory: u'c:/t1/hg/comm-central/mozilla/obj-i686-pc-mingw32\\_tests\\testing\\mochitest\\runtests.py'
Getting closer. Mach couldn't find my mozconfig. Set the env to: MOZCONFIG=/c/t1/hg/comm-central/mozconfig I tried replacing all instances of 'firefox' with 'seamonkey' in mach_commands.py that didn't work either. I tried renaming seamonkey.exe to firefox.exe but that didn't work either. Anything else I can try? Philip@lenovo-PC /c/t1/hg/comm-central $ MOZCONFIG=/c/t1/hg/comm-central/mozconfig mozilla/mach mochitest suite/browser/test/browser/browser_urlbarCopying.js It looks like you tried to run a mach command from an invalid context. The mochitest command failed to meet the following conditions: is_buildapp_supported - Must have a firefox or b2g or android or mulet build. Run |mach help| to show a list of all commands available to the current context. Philip@lenovo-PC /c/t1/hg/comm-central $ MOZCONFIG=/c/t1/hg/comm-central/mozconfig mozilla/mach mochitest --appname=/c/t1/hg/objdir-sm/dist/bin/seamonkey.exe suite/browser/test/browser/browser_urlbarCopying.js It looks like you tried to run a mach command from an invalid context. The mochitest command failed to meet the following conditions: is_buildapp_supported - Must have a firefox or b2g or android or mulet build. Run |mach help| to show a list of all commands available to the current context.
Flags: needinfo?(gps)
testing/mochitest/mach_commands.py has a SUPPORTED_APPS variable that isn't recognizing comm-central and is refusing to run mochitests. This is a problem for projects not in tree :/ I recommend adding an environment variable or mach settings option to supplement this list or disable the check and allow out-of-tree applications to be detected.
Flags: needinfo?(gps)
Attached patch Proposed fix.Splinter Review
(In reply to Gregory Szorc [:gps] from comment #6) > testing/mochitest/mach_commands.py has a SUPPORTED_APPS variable that isn't > recognizing comm-central and is refusing to run mochitests. This is a > problem for projects not in tree :/ > > I recommend adding an environment variable or mach settings option to > supplement this list or disable the check and allow out-of-tree applications > to be detected. I know nothing about Python except that it's a really terrible language. After a bit or random trial and error I managed to get mochitests to run with the attached patch. I also had to fix several JavaScript errors: JavascriptException: JavascriptException: ReferenceError: Cc is not defined stacktrace: execute_script @runtests.py, line 1292 inline javascript, line 7 src: "let wm = Cc["@mozilla.org/appshell/window-mediator;1"]" Stack: JavaScript error: chrome://mochikit/content/browser-test.js, line 6: ReferenceError: Cu is not defined
Attachment #8759398 - Flags: feedback?(gps)
Comment on attachment 8759398 [details] [diff] [review] Proposed fix. Review of attachment 8759398 [details] [diff] [review]: ----------------------------------------------------------------- >>> I know nothing about Python except that it's a really terrible language. Please don't jump to conclusions because of a lack of understanding. People obviously enjoy Python or it wouldn't be so popular. Of course, that doesn't mean it isn't a terrible language (JavaScript is a terrible language and it is popular) :) See my earlier comment about doing this through environment variables. We don't want to have to create one-off references to every app that wishes to use the mochitest harness inside mozilla-central.
Attachment #8759398 - Flags: feedback?(gps) → feedback-
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: