Closed Bug 1206142 Opened 9 years ago Closed 9 years ago

Android 'mach xpcshell-test' fails with 'You must provide a device IP to connect to via the --ip option'

Categories

(Testing :: XPCShell Harness, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

Details

Attachments

(1 file)

I think this regressed within the last 24 hours.

gbrown@mozpad:~/src$ ./mach xpcshell-test
From _tests: Kept 36386 existing; Added/updated 0; Removed 0 files and 0 directories.
Error running mach:

    ['xpcshell-test']

The error occurred in the implementation of the invoked mach command.

This should never occur and is likely a bug in the implementation of that
command. Consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

Exception: You must provide a device IP to connect to via the --ip option

  File "/home/gbrown/src/testing/xpcshell/mach_commands.py", line 364, in run_xpcshell_test
    return xpcshell.run_test(**params)
  File "/home/gbrown/src/testing/xpcshell/mach_commands.py", line 169, in run_test
    kwargs["remoteTestRoot"])
  File "/home/gbrown/src/testing/xpcshell/mach_commands.py", line 156, in get_devicemanager
    raise Exception("You must provide a device IP to connect to via the --ip option")
It looks like the default device manager changed from adb to sut. "mach xpcshell-test --dm_trans adb" is an effective work-around.
I think this was affected by bug 1193257. Previously, the harness --dm_trans default was sut but that was over-ridden by mach. Now mach and the harness use the default in xpcshellcommandline.
Android 2.3 mozharness jobs assume 'sut' is the default:

07:13:38     INFO - Running command: ['/builds/slave/test/build/venv/bin/python', '-u', '/builds/slave/test/build/tests/xpcshell/remotexpcshelltests.py', '--deviceIP=127.0.0.1', '--devicePort=20701', '--xre-path=/builds/slave/test/build/hostutils/xre', '--testing-modules-dir=/builds/slave/test/build/tests/modules', '--apk=/builds/slave/test/build/fennec-43.0a1.en-US.android-arm.apk', '--no-logfiles', '--symbols-path=https://queue.taskcluster.net/v1/task/C-f_nVX7SJCmbLJWFqK23A/artifacts/public/build/fennec-43.0a1.en-US.android-arm.crashreporter-symbols.zip', '--manifest=tests/xpcshell.ini', '--log-raw=/builds/slave/test/build/blobber_upload_dir/xpcshell-3_raw.log', '--log-errorsummary=/builds/slave/test/build/blobber_upload_dir/xpcshell-3_errorsummary.log', '--total-chunks=3', '--this-chunk=3'] in /builds/slave/test/build/tests/xpcshell
Assignee: nobody → gbrown
This changes the xpcshellcommandline Android default dm_trans to adb. mach uses that, fixing this bug. 

To avoid changes to mozharness jobs, I explicitly specify sut for Android 2.3 and Android x86 (Android 4.3 uses adb and already explicitly selects adb).

https://treeherder.mozilla.org/#/jobs?repo=try&revision=173dcf2ac956
Attachment #8663048 - Flags: review?(james)
Attachment #8663048 - Flags: review?(james) → review+
https://hg.mozilla.org/mozilla-central/rev/65cbc7d21339
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: