47 bytes, text/x-phabricator-request
|Details | Review|
When I run "./mach test <path/to/python/test.py>", I get the following output. This has been reproducible with multiple Python tests. $ ./mach test toolkit/components/telemetry/tests/python/ Error running mach: ['test', 'toolkit/components/telemetry/tests/python/'] 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/mythmon/src/mozilla-unified/testing/mach_commands.py", line 169, in test argv=extra_args, test_objects=tests, **kwargs) File "/home/mythmon/src/mozilla-unified/python/mach/mach/registrar.py", line 129, in dispatch return self._run_command_handler(handler, context=context, **kwargs) File "/home/mythmon/src/mozilla-unified/python/mach/mach/registrar.py", line 90, in _run_command_handler result = fn(**kwargs) File "/home/mythmon/src/mozilla-unified/python/mach_commands.py", line 92, in python_test return self.run_python_tests(*args, **kwargs) File "/home/mythmon/src/mozilla-unified/python/mach_commands.py", line 105, in run_python_tests self.activate_pipenv(pipfile=None, populate=True, python=python) File "/home/mythmon/src/mozilla-unified/python/mozbuild/mozbuild/base.py", line 775, in activate_pipenv self.virtualenv_manager.activate_pipenv(pipfile, populate, python) File "/home/mythmon/src/mozilla-unified/python/mozbuild/mozbuild/virtualenv.py", line 621, in activate_pipenv stderr=subprocess.STDOUT, env=env) File "/usr/lib64/python2.7/subprocess.py", line 185, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib64/python2.7/subprocess.py", line 172, in call return Popen(*popenargs, **kwargs).wait() File "/usr/lib64/python2.7/subprocess.py", line 394, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception
Not sure what's going on, but this is happening during `pipenv run python` when we populate the venv with the packages in virtualenv_packages.txt.
Oh, I missed that this was running with |mach test|. Yeah I wouldn't expect that to work. Do you see the same issue with |mach python-test|? The bug is still valid though as we should be supporting python tests in |mach test|.
When using |mach python-test|, the test works as expected. It looks to me like |mach test| is calling |python-test| under the hood.
Yeah, it's still a bug. All I meant was that I don't think anyone ever put in the effort to get |mach python-test| working properly with |mach test| so I'm not surprised that it's failing. I can reproduce this error too.
Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Priority: P3 → P1
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/15f725097416 [mach] Pass path to Python interpreter to python-tests. r=ahal
Flags: needinfo?(hskupin) → needinfo?(ahal)
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/0dd2c013c984 [mach] Pass path to Python interpreter to python-tests. r=ahal
4 months ago
You need to log in before you can comment on or make changes to this bug.