Closed
Bug 898725
Opened 11 years ago
Closed 11 years ago
mach fails to run mochitests: 'TypeError: __init__() takes at most 2 arguments (3 given)'
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla25
People
(Reporter: ttaubert, Assigned: ahal)
References
Details
(Keywords: regression, Whiteboard: [mach])
Attachments
(1 file)
(deleted),
patch
|
jgriffin
:
review+
|
Details | Diff | Splinter Review |
TypeError: __init__() takes at most 2 arguments (3 given)
File "/home/tim/workspace/fx-team/testing/mochitest/mach_commands.py", line 280, in run_mochitest_browser
return self.run_mochitest(test_file, 'browser', **kwargs)
File "/home/tim/workspace/fx-team/testing/mochitest/mach_commands.py", line 299, in run_mochitest
**kwargs)
File "/home/tim/workspace/fx-team/testing/mochitest/mach_commands.py", line 111, in run_mochitest_test
opts = mochitest.MochitestOptions(automation, tests_dir)
This happens with fx-team tip (i.e. m-c tip as of now).
Comment 2•11 years ago
|
||
mochitest_options.py is a new file added by bug 865349. The MochitestOptions class was moved from runtests.py and put in this new file, but in the process lost its second positional arg, scriptdir. The removal of this param causes the issue.
If you hack things to get past this, the next problem I have on Windows is:
===
The details of the failure are as follows:
TypeError: environment can only contain strings
File "o:\src\mm\mozilla-hg\mc-socialapi-landing\testing/mochitest/mach_commands.py", line 282, in run_mochitest_browser
...
File "o:\src\mm\mozilla-hg\mc-socialapi-landing/obj-release\_tests\testing\mochitest\runtests.py", line 90, in start
self._process = self._automation.Process([xpcshell] + args, env = env)
File "o:\src\mm\mozilla-hg\mc-socialapi-landing/obj-release\build\automation.py", line 201, in __init__
===
The problem here is that the PATH key of env is unicode. This is as far as I got.
OS: Linux → All
Hardware: x86_64 → All
Assignee | ||
Comment 3•11 years ago
|
||
This is because I removed the dependency from automation.py in the options class. Sorry, should have thought to update the mach runner at the same time. Patch coming shortly.
Status: NEW → ASSIGNED
QA Contact: ahalberstadt
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Mark Hammond (:markh) from comment #2)
> If you hack things to get past this, the next problem I have on Windows is:
>
> ===
> The details of the failure are as follows:
>
> TypeError: environment can only contain strings
>
> File
> "o:\src\mm\mozilla-hg\mc-socialapi-landing\testing/mochitest/mach_commands.
> py", line 282, in run_mochitest_browser
> ...
>
> File
> "o:\src\mm\mozilla-hg\mc-socialapi-landing/obj-
> release\_tests\testing\mochitest\runtests.py", line 90, in start
> self._process = self._automation.Process([xpcshell] + args, env = env)
> File
> "o:\src\mm\mozilla-hg\mc-socialapi-landing/obj-release\build\automation.py",
> line 201, in __init__
> ===
>
> The problem here is that the PATH key of env is unicode. This is as far as
> I got.
So this used to work prior to bug 865349? I'm not really sure what I could have changed that would cause the env to be in unicode..
Assignee | ||
Comment 6•11 years ago
|
||
This will fix the init problem, and adds an mpl header.
Assignee: nobody → ahalberstadt
Attachment #782598 -
Flags: review?(jgriffin)
Assignee | ||
Updated•11 years ago
|
QA Contact: ahalberstadt
Comment 7•11 years ago
|
||
I am getting a different error:
http://pastebin.mozilla.org/2737950
File "_tests/testing/mochitest/runtests.py", line 178, in __init__
mozinfo.find_and_update_from_json(SCRIPT_DIR)
AttributeError: 'module' object has no attribute 'find_and_update_from_json'
Should I open a different bug? If I backout the patch from bug 865349 I am not getting any errors.
I'm using Ubuntu 12.04 LTS, Python 2.7.3.
Updated•11 years ago
|
Attachment #782598 -
Flags: review?(jgriffin) → review+
Comment 8•11 years ago
|
||
(In reply to Mihai Sucan [:msucan] from comment #7)
> I am getting a different error:
>
> http://pastebin.mozilla.org/2737950
>
> File "_tests/testing/mochitest/runtests.py", line 178, in __init__
> mozinfo.find_and_update_from_json(SCRIPT_DIR)
> AttributeError: 'module' object has no attribute 'find_and_update_from_json'
>
> Should I open a different bug? If I backout the patch from bug 865349 I am
> not getting any errors.
>
> I'm using Ubuntu 12.04 LTS, Python 2.7.3.
That method was added in http://hg.mozilla.org/mozilla-central/rev/a13dafd65d1c; the error suggests you're picking up an old version of mozinfo.py. You might try removing your virtualenv (/home/mihai/Public/builds/firefox/fx-team/browser-opt/_virtualenv), and re-building.
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Mihai Sucan [:msucan] from comment #7)
> I am getting a different error:
>
> http://pastebin.mozilla.org/2737950
>
> File "_tests/testing/mochitest/runtests.py", line 178, in __init__
> mozinfo.find_and_update_from_json(SCRIPT_DIR)
> AttributeError: 'module' object has no attribute 'find_and_update_from_json'
>
> Should I open a different bug? If I backout the patch from bug 865349 I am
> not getting any errors.
>
> I'm using Ubuntu 12.04 LTS, Python 2.7.3.
Alternatively if you use mach to run the mochitests it should pick up the correct in-tree versions of mozbase for you.
Comment 10•11 years ago
|
||
Bugs with mach commands go in the component providing the mach command.
Component: mach → Mochitest
Product: Core → Testing
Whiteboard: [mach]
Assignee | ||
Comment 11•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f18ba2a7e24c
Mark, do you think your env problem is related to the patch in bug 865349? If so, lets file a separate bug for that issue.
Flags: needinfo?(mhammond)
Comment 12•11 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #11)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/f18ba2a7e24c
>
> Mark, do you think your env problem is related to the patch in bug 865349?
> If so, lets file a separate bug for that issue.
It looks like bug 898903.
Comment 14•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Comment 15•11 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #11)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/f18ba2a7e24c
>
> Mark, do you think your env problem is related to the patch in bug 865349?
I think it was as backing out that patch caused everything to work fine. However, now this fix has made it to m-c I no longer have any problems, so there's nothing else to do here - thanks!
Flags: needinfo?(mhammond)
You need to log in
before you can comment on or make changes to this bug.
Description
•