Closed Bug 1481449 Opened 6 years ago Closed 6 years ago

mach test with no arguments ends with a child_exception

Categories

(Testing :: General, enhancement, P1)

Version 3
enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: jgraham, Assigned: gbrown)

References

Details

Attachments

(1 file)

james@ginny:~/develop/gecko$ ./mach test
[…]
Error running mach:

    ['test']

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
message.

The details of the failure are as follows:

TypeError: coercing to Unicode: need string or buffer, NoneType found

  File "/home/james/develop/gecko/testing/mach_commands.py", line 171, in test
    argv=extra_args, test_objects=tests, **kwargs)
  File "/home/james/develop/gecko/python/mach/mach/registrar.py", line 129, in dispatch
    return self._run_command_handler(handler, context=context, **kwargs)
  File "/home/james/develop/gecko/python/mach/mach/registrar.py", line 90, in _run_command_handler
    result = fn(**kwargs)
  File "/home/james/develop/gecko/python/mach_commands.py", line 92, in python_test
    return self.run_python_tests(*args, **kwargs)
  File "/home/james/develop/gecko/python/mach_commands.py", line 105, in run_python_tests
    self.activate_pipenv(pipfile=None, populate=True, python=python)
  File "/home/james/develop/gecko/python/mozbuild/mozbuild/base.py", line 764, in activate_pipenv
    self.virtualenv_manager.activate_pipenv(pipfile, populate, python)
  File "/home/james/develop/gecko/python/mozbuild/mozbuild/virtualenv.py", line 608, in activate_pipenv
    stderr=subprocess.STDOUT, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 185, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 172, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception

Supporting this is silly anyway, we should set nargs="+" on the path argument since wanting to run every test in the tree is not a sensible thing anyone should be doing; if you are doing this it's probably an error and you need help.
Assignee: nobody → gbrown
Priority: -- → P1
I agree with James. :)

Now:

$ mach test
usage: mach [-h] [--log-unittest LOG_UNITTEST] [--log-raw LOG_RAW]
            [--log-html LOG_HTML] [--log-tbpl LOG_TBPL]
            [--log-xunit LOG_XUNIT] [--log-mach LOG_MACH] [--log-tbpl-compact]
            [--log-mach-buffer LOG_MACH_BUFFER]
            [--log-tbpl-buffer LOG_TBPL_BUFFER] [--log-mach-verbose]
            [--log-mach-level LOG_MACH_LEVEL] [--log-raw-level LOG_RAW_LEVEL]
            [--log-tbpl-level LOG_TBPL_LEVEL]
            what [what ...]
mach: error: too few arguments
$
Attachment #9005461 - Flags: review?(ahal)
Comment on attachment 9005461 [details] [diff] [review]
require one test argument

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

Thanks!
Attachment #9005461 - Flags: review?(ahal) → review+
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/59eabdc7dc1a
Require at least one test argument for 'mach test'; r=ahal
https://hg.mozilla.org/mozilla-central/rev/59eabdc7dc1a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Regressions: 1516847
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: