Closed Bug 912779 Opened 11 years ago Closed 11 years ago

AttributeError: 'MochiRemote' object has no attribute 'error'

Categories

(Testing :: Mochitest, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: kats, Assigned: gbrown)

References

Details

Attachments

(1 file)

Trying to run robocop, I get an error in runtestsremote.py, referencing self.error which doesn't exist:


kats@kgupta-air mozilla-git$ make -C obj-android mochitest-robocop
Device info: {}
Test root: /mnt/sdcard/tests
Automation Error: Exception caught while running tests
Traceback (most recent call last):
  File "_tests/testing/mochitest/runtestsremote.py", line 648, in main
  File "/Users/kats/zspace/mozilla-git/obj-android-debug/_tests/testing/mochitest/runtests.py", line 562, in runTests
    self.startWebServer(options)
  File "_tests/testing/mochitest/runtestsremote.py", line 313, in startWebServer
AttributeError: 'MochiRemote' object has no attribute 'error'
Traceback (most recent call last):
  File "_tests/testing/mochitest/runtestsremote.py", line 711, in <module>
    main()
  File "_tests/testing/mochitest/runtestsremote.py", line 661, in main
    mochitest.stopWebServer(options)
  File "_tests/testing/mochitest/runtestsremote.py", line 332, in stopWebServer
    self.server.stop()
AttributeError: 'MochiRemote' object has no attribute 'server'
make: *** [mochitest-robocop] Error 1
Assignee: nobody → gbrown
I can reproduce this by setting MOZ_HOST_BIN to point to an Android ARM build:

mozdev@ubuntu:~/src$ export MOZ_HOST_BIN=/home/mozdev/objdirs/droid/dist/bin
mozdev@ubuntu:~/src$ make -C ~/objdirs/droid mochitest-robocop --dry-run
make: Entering directory `/home/mozdev/objdirs/droid'
if [ ! -f /home/mozdev/objdirs/droid/dist/bin/xpcshell ]; then \
        echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
    elif [ "" = "" -a "adb" != "adb" ]; then \
        echo "please prepare your host with the environment variable TEST_DEVICE"; \
    else \
        rm -f ./mochitest-robocop.log && /home/mozdev/objdirs/droid/_virtualenv/bin/python _tests/testing/mochitest/runtestsremote.py --robocop-apk=./build/mobile/robocop/robocop-debug.apk --robocop-ids=./mobile/android/base/fennec_ids.txt --robocop-ini=./build/mobile/robocop/robocop.ini --console-level=INFO --log-file=./mochitest-robocop.log --file-level=INFO  --dm_trans=adb --app=org.mozilla.fennec_mozdev --deviceIP= --xre-path=/home/mozdev/objdirs/droid/dist/bin --httpd-path=. --symbols-path=./dist/crashreporter-symbols  ; \
    fi
make: Leaving directory `/home/mozdev/objdirs/droid'
mozdev@ubuntu:~/src$ make -C ~/objdirs/droid mochitest-robocop
make: Entering directory `/home/mozdev/objdirs/droid'
Error deleting /data/anr/traces.txt
Device info: {}
Test root: /mnt/sdcard/tests
Automation Error: Exception caught while running tests
Traceback (most recent call last):
  File "_tests/testing/mochitest/runtestsremote.py", line 648, in main
  File "/home/mozdev/objdirs/droid/_tests/testing/mochitest/runtests.py", line 562, in runTests
    self.startWebServer(options)
  File "_tests/testing/mochitest/runtestsremote.py", line 313, in startWebServer
AttributeError: 'MochiRemote' object has no attribute 'error'
Traceback (most recent call last):
  File "_tests/testing/mochitest/runtestsremote.py", line 711, in <module>
    main()
  File "_tests/testing/mochitest/runtestsremote.py", line 661, in main
    mochitest.stopWebServer(options)
  File "_tests/testing/mochitest/runtestsremote.py", line 332, in stopWebServer
    self.server.stop()
AttributeError: 'MochiRemote' object has no attribute 'server'
make: *** [mochitest-robocop] Error 1
make: Leaving directory `/home/mozdev/objdirs/droid'
mozdev@ubuntu:~/src$
This needs to apply on top of the second patch from bug 908275, so that I can use log.error.

With 908275 + this patch and MOZ_HOST_BIN set to an ARM xpcshell:

mozdev@ubuntu:~/src$ make -C ~/objdirs/droid mochitest-robocop
make: Entering directory `/home/mozdev/objdirs/droid'
Error deleting /data/anr/traces.txt
Mochi-Remote INFO | Device info: {}
Mochi-Remote INFO | Test root: /mnt/sdcard/tests
Mochi-Remote ERROR | xpcshell at /home/mozdev/objdirs/droid/dist/bin/xpcshell is an ARM binary; please use the --utility-path argument to specify the path to a desktop version.
Mochi-Remote ERROR | Automation Error: Exception caught while running tests
Traceback (most recent call last):
  File "_tests/testing/mochitest/runtestsremote.py", line 653, in main
  File "/home/mozdev/objdirs/droid/_tests/testing/mochitest/runtests.py", line 562, in runTests
    self.startWebServer(options)
  File "_tests/testing/mochitest/runtestsremote.py", line 319, in startWebServer
SystemExit: 1
Mochi-Remote WARNING | Unable to retrieve log file (/mnt/sdcard/tests/logs/mochitest.log) from remote device
INFO | runtests.py | Test summary: start.
0 INFO SimpleTest START
1 INFO TEST-START | Shutdown
2 INFO Passed: 0
3 INFO Failed: 0
4 INFO Todo: 0
5 INFO SimpleTest FINISHED
INFO | runtests.py | Test summary: end.
Mochi-Remote INFO    | 
--------- beginning of /dev/log/main
Mochi-Remote INFO    | Device info: {}
Mochi-Remote INFO    | Test root: /mnt/sdcard/tests
make: *** [mochitest-robocop] Error 1
make: Leaving directory `/home/mozdev/objdirs/droid'
mozdev@ubuntu:~/src$
Attachment #800198 - Flags: review?(jmaher)
Attachment #800198 - Flags: review?(jmaher) → review+
https://hg.mozilla.org/mozilla-central/rev/d92272c6731b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: