Closed Bug 857252 Opened 8 years ago Closed 8 years ago

testing-modules-dir is not defined

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla23

People

(Reporter: jmaher, Assigned: jmaher)

Details

Attachments

(1 file, 1 obsolete file)

while attempting to run mochitests from the test package as we do from make, I found a new command line argument --test-modules-dir.  When using this, I get an error:

jmaher@jmaher-MacBookPro:~/mozilla/src/objdir-droid/dist/test-package-stage/mochitest$ python runtestsremote.py --app org.mozilla.fennec_dminor --xre-path=/home/jmaher/mozilla/inbound/obj-x86_64-unknown-linux-gnu/dist/bin/ --deviceIP 10.251.30.62 --test-path=dom/tests/mochitest/dom-level1-core --autorun --close-when-done --testing-modules-dir=../../../_tests/modules --console-level=INFO --dm_trans=sut --file-level=INFO --log-file=mochitest-remote.log
Traceback (most recent call last):
  File "runtestsremote.py", line 654, in <module>
    main()
  File "runtestsremote.py", line 514, in main
    options = parser.verifyOptions(options, mochitest)
  File "runtestsremote.py", line 190, in verifyOptions
    options = MochitestOptions.verifyOptions(self, options, mochitest)
  File "/home/jmaher/mozilla/src/objdir-droid/dist/test-package-stage/mochitest/runtests.py", line 361, in verifyOptions
    options.testingModulesDir = os.path.abspath(testingModulesDir)
NameError: global name 'testingModulesDir' is not defined


It appears we never tested this code before landing it as we need options.testingModulesDir.
this appears to cause us to fail to define SpecialPowers for android mochitests.
I am not familiar with --testing-modules-dir, but this is causing mobile (android) mochitests to fail and we are not using these commands in our automation via buildbot.  Developers should be running tests locally as close as possible to what we are running in automation.
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #732473 - Flags: review?(gps)
Comment on attachment 732473 [details] [diff] [review]
fix runtests.py to use options.testingModulesDir and remove references from testsuite-targets.mk to match what we run via buildbot (1.0)

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

I will r+ the change to runtests.py. However, testsuite-targets.mk gets an r- because we theoretically need this code to support running mochitests that rely on testing-only JS modules. The fact that things run properly on automation without this flag to runtests.py *probably* indicates that no mochitests are currently using testing-only modules. Boo. That is a bug: the automation should define testingModulesDir.

For a history of this feature, start with bug 759664 and trace it backwards.
Attachment #732473 - Flags: review?(gps)
Specifically:
http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/runtests.py#343

Makes this work on buildbot without explicitly specifying --testing-modules-dir. We decided to implement it this way because adding arguments to the test runners on buildbot is a pain (as you well know).
Oh. That. I tried to forget that bad memory.
Attachment #735906 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/5f2b80e214af
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.