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

RESOLVED FIXED in mozilla26

Status

Testing
Mochitest
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: kats, Assigned: gbrown)

Tracking

unspecified
mozilla26
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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)

Updated

4 years ago
Assignee: nobody → gbrown
(Assignee)

Comment 1

4 years ago
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$
(Assignee)

Comment 2

4 years ago
Created attachment 800198 [details] [diff] [review]
fix error handling when arm binary specified for xpcshell

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+
(Assignee)

Comment 3

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d92272c6731b
https://hg.mozilla.org/mozilla-central/rev/d92272c6731b
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in before you can comment on or make changes to this bug.