make mochitest-robotium may fail with: OSError: [Errno 2] No such file or directory: '/tmp/xxx/tests.jar'

RESOLVED FIXED in mozilla20

Status

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gbrown, Assigned: jmaher)

Tracking

unspecified
mozilla20
x86
Android
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
When running robocop tests, a recent optimization tries to delete tests.jar from the temporary profile; if tests.jar does not exist, the test run fails. I recently clobbered my objdir and found I no longer have a tests.jar.

It is probably best to only attempt to delete this file if it exists.

    mozdev@mozdev-virtual-machine:/media/extra/objdir-native-droid$ make mochitest-robotium
    /media/extra/objdir-native-droid/_virtualenv/bin/python ./build/mobile/robocop/parse_ids.py -i ./mobile/android/base/R.java -o ./build/mobile/robocop/fennec_ids.txt
    {'uptime': ['7 days 19 hours 46 minutes 10 seconds 635 ms'], 'power': ['Power status:', ' AC power ONLINE', ' Battery charge NO BATTERY', ' Remaining charge: 0%', ' Battery Temperature: 0.0 (c)'], 'process': [['10026', '12920', 'com.svox.pico'], ['10007', '1293', 'com.android.inputmethod.latin'], ['1001', '1303', 'com.android.phone'], ['1000', '1021', 'system'], ['10028', '12837', 'com.android.defcontainer'], ['10010', '1452', 'com.android.providers.calendar'], ['10031', '8734', 'com.mozilla.SUTAgentAndroid'], ['10018', '1313', 'com.android.launcher'], ['10013', '1525', 'com.cooliris.media'], ['10009', '1508', 'com.android.quicksearchbox'], ['10002', '1517', 'com.android.music'], ['10032', '1486', 'com.mozilla.watcher'], ['10004', '1390', 'android.process.media'], ['10006', '1469', 'com.android.mms'], ['10014', '1439', 'com.android.email'], ['10017', '1431', 'com.android.bluetooth'], ['10029', '1422', 'com.android.deskclock']], 'screen': ['X:1024 Y:768'], 'memory': ['PA:820084736, FREE: 718835712'], 'systime': ['1970/01/08 07:46:27:083'], 'rotation': ['ROTATION:0'], 'disk': [], 'os': ['harmony-eng 2.2 FRF91 20110202.102810 test-keys'], 'id': ['00:26:e8:d4:1a:e4'], 'uptimemillis': ['675970655']}
    removing file: /mnt/sdcard/tests/fennec_ids.txt
    removing file: /mnt/sdcard/tests/robotium.config
    INFO | runtests.py | Installing extension at /media/extra/objdir-native-droid/_tests/testing/mochitest/extensions/workerbootstrap to /tmp/tmpvy2mH6.
    INFO | runtests.py | Installing extension at /media/extra/objdir-native-droid/_tests/testing/mochitest/extensions/roboextender@mozilla.org to /tmp/tmpvy2mH6.
    INFO | runtests.py | Installing extension at /media/extra/objdir-native-droid/_tests/testing/mochitest/extensions/worker to /tmp/tmpvy2mH6.
    INFO | runtests.py | Installing extension at /media/extra/objdir-native-droid/_tests/testing/mochitest/extensions/specialpowers to /tmp/tmpvy2mH6.
    Automation Error: Exception caught while running tests
    Traceback (most recent call last):
      File "_tests/testing/mochitest/runtestsremote.py", line 529, in main
      File "/media/extra/objdir-native-droid/_tests/testing/mochitest/runtests.py", line 696, in runTests
        manifest = self.buildProfile(options)
      File "_tests/testing/mochitest/runtestsremote.py", line 308, in buildProfile
    OSError: [Errno 2] No such file or directory: '/tmp/tmpvy2mH6/tests.jar'
    Traceback (most recent call last):
      File "_tests/testing/mochitest/runtestsremote.py", line 579, in <module>
        main()
      File "_tests/testing/mochitest/runtestsremote.py", line 540, in main
        mochitest.stopWebServer(options)
      File "_tests/testing/mochitest/runtestsremote.py", line 292, in stopWebServer
        self.server.stop()
    AttributeError: 'MochiRemote' object has no attribute 'server'
    make: *** [mochitest-robotium] Error 1
    mozdev@mozdev-virtual-machine:/media/extra/objdir-native-droid$
(Assignee)

Comment 1

6 years ago
Created attachment 697982 [details] [diff] [review]
check for file existence before removing (1.0)
Assignee: gbrown → jmaher
Status: NEW → ASSIGNED
Attachment #697982 - Flags: review?(gbrown)
(Reporter)

Comment 2

6 years ago
Created attachment 697983 [details] [diff] [review]
allow for missing tests.jar

This works for me. 

I am only handling tests.jar specially since the other files seem to always be present.
Attachment #697983 - Flags: review?(jmaher)
(Reporter)

Comment 3

6 years ago
Comment on attachment 697982 [details] [diff] [review]
check for file existence before removing (1.0)

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

Ha!
Attachment #697982 - Flags: review?(gbrown) → review+
(Reporter)

Updated

6 years ago
Attachment #697983 - Attachment is obsolete: true
Attachment #697983 - Flags: review?(jmaher)
https://hg.mozilla.org/mozilla-central/rev/3a2d5a7a446f
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.