testing-modules-dir is not defined

RESOLVED FIXED in mozilla23

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jmaher, Assigned: jmaher)

Tracking

unspecified
mozilla23
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
this appears to cause us to fail to define SpecialPowers for android mochitests.
(Assignee)

Comment 2

6 years ago
Created 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)

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 3

6 years ago
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).

Comment 5

6 years ago
Oh. That. I tried to forget that bad memory.
(Assignee)

Comment 6

6 years ago
Created attachment 735906 [details] [diff] [review]
fix runtests.py to use options.testingModulesDir and remove references from testsuite-targets.mk to match what we run via buildbot (2.0)

updated to just fix the python bits in the harness.
Attachment #732473 - Attachment is obsolete: true
Attachment #735906 - Flags: review?(gps)

Updated

6 years ago
Attachment #735906 - Flags: review?(gps) → review+
https://hg.mozilla.org/mozilla-central/rev/5f2b80e214af
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.