Closed Bug 899047 Opened 6 years ago Closed 6 years ago
Unable to run Robocop tests locally - the script is looking for binary under /dist/bin/fennec and should look under /dist/fennec
A recent change which I have not yet been able to identify has changed the /python/mozbuild/mozbuild/base.py script most likely and now it checks for binaries under objdir/dist/bin/fennec instead of objdir/dist/fennec. Making a copy of the fennec folder in objdir/bin solves the issue and I can run Robocop tests again. This is reproducible both when tunning the test using make-robocop and the runtestsremote script from the virtualenv. Error: raceback (most recent call last): File "_tests/testing/mochitest/runtestsremote.py", line 19, in <module> from runtests import Mochitest File "/home/adriantamas/mc/obj-android/_tests/testing/mochitest/runtests.py", line 26, in <module> from mochitest_options import MochitestOptions File "/home/adriantamas/mc/obj-android/_tests/testing/mochitest/mochitest_options.py", line 23, in <module> class MochitestOptions(optparse.OptionParser): File "/home/adriantamas/mc/obj-android/_tests/testing/mochitest/mochitest_options.py", line 44, in MochitestOptions "default": build_obj.get_binary_path() if build_obj is not None else None, File "/home/adriantamas/mc/python/mozbuild/mozbuild/base.py", line 279, in get_binary_path raise Exception('Binary expected at %s does not exist.' % path) Exception: Binary expected at /home/adriantamas/mc/obj-android/dist/bin/fennec does not exist.
Looks like mozbuild should detect if the objdir was built for fennec and update get_binary_path() accordingly?
It turns out that Fennec doesn't actually care about --appname at all, and bug 865349 basically broke the hack that was used to get around the fact that verifyOptions required it: http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/runtestsremote.py#210 This patch moves the get_binary_path call into verify options which makes the hack work again. I don't have a fennec build handy, but I'm pretty sure this will make things work again. Would someone mind verifying? I'll leave it up to ted or gps if they want to modify get_binary_path to work for fennec, though I don't think there is a pressing need for it.
Assignee: nobody → ahalberstadt
Status: NEW → ASSIGNED
Attachment #783779 - Flags: review?(gbrown)
Helps to actually qref the patch in question..
Comment on attachment 783780 [details] [diff] [review] Patch 1.0 - call get_binary_path in verify options Review of attachment 783780 [details] [diff] [review]: ----------------------------------------------------------------- With the one indentation problem corrected, this works fine for me. ::: testing/mochitest/mochitest_options.py @@ +336,5 @@ > > def verifyOptions(self, options, mochitest): > """ verify correct options and cleanup paths """ > > + if options.app is None: The indent is off by 1 space here. That caused: $ make mochitest-robocop Traceback (most recent call last): File "_tests/testing/mochitest/runtestsremote.py", line 19, in <module> from runtests import Mochitest File "/home/mozdev/objdirs/x86/_tests/testing/mochitest/runtests.py", line 25, in <module> from mochitest_options import MochitestOptions File "/home/mozdev/objdirs/x86/_tests/testing/mochitest/mochitest_options.py", line 344 if options.app is None: ^ IndentationError: unindent does not match any outer indentation level make: *** [mochitest-robocop] Error 1
Attachment #783780 - Flags: review?(gbrown) → review+
Thanks, fixed indent and pushed: https://hg.mozilla.org/integration/mozilla-inbound/rev/f76c013e50a6
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
You need to log in before you can comment on or make changes to this bug.