Open Bug 1350935 Opened 4 years ago Updated 4 years ago

"mach mochitest --appname dist" gives a not very useful error message when the build hasn't been packaged yet


(Testing :: Mochitest, defect)

Not set


(Not tracked)


(Reporter: florian, Unassigned)


"mach mochitest --appname dist" only works if "mach package" has been ran before. If somehow a clobber occured I need to remember to "mach package" again. If I forget, the unhelpful error message I get is the following:

$ ./mach mochitest --appname dist browser/base/content/test/static/browser_all_files_referenced.js
cat: No such file or directory
Build configuration changed. Regenerating backend.

### Now running mochitest-browser.

Error running mach:

    ['mochitest', '--appname', 'dist', 'browser/base/content/test/static/browser_all_files_referenced.js']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error

The details of the failure are as follows:

Exception: Binary expected at /Users/florian/buildhg/mozilla/obj-browser/dist/firefox/ does not exist.

  File "/Users/florian/buildhg/mozilla/testing/mochitest/", line 408, in run_mochitest_general
  File "/Users/florian/buildhg/mozilla/testing/mochitest/", line 158, in run_desktop_test
    result = mochitest.run_test_harness(parser, options)
  File "/Users/florian/buildhg/mozilla/obj-browser/_tests/testing/mochitest/", line 2751, in run_test_harness
  File "/Users/florian/buildhg/mozilla/obj-browser/_tests/testing/mochitest/", line 1104, in validate
    args = container.validate(self, args, self.context)
  File "/Users/florian/buildhg/mozilla/obj-browser/_tests/testing/mochitest/", line 639, in validate = build_obj.get_binary_path(where='staged-package')
  File "/Users/florian/buildhg/mozilla/python/mozbuild/mozbuild/", line 336, in get_binary_path
    raise Exception('Binary expected at %s does not exist.' % path)

I think in that case mach should either say "please run mach package", or even better just do it automatically.
Component: mach → Mochitest
Product: Core → Testing
You need to log in before you can comment on or make changes to this bug.