Open Bug 1261461 Opened 9 years ago Updated 2 years ago

No support for xpcshell firefox-appdir on Android

Categories

(Testing :: XPCShell Harness, defect)

defect

Tracking

(Not tracked)

People

(Reporter: gbrown, Unassigned)

References

Details

Some xpcshell manifests (xpcshell.ini) contain "firefox-appdir = browser", indicating that "-a <dir>/browser" should be passed to xpcshell. That does not work on Android because: - "firefox-appdir" is recognized when it matches mozinfo["appname"]+"-appdir", but on Android mozinfo["appname"] == "fennec" - <dir>/browser is never pushed to the device - that -a argument is removed from the Android command line, in favor of --greomni

Why would this be a problem?

Is this still a problem?

I tried to verify these statements by digging in the source code.

Some xpcshell manifests (xpcshell.ini) contain "firefox-appdir = browser", indicating that "-a <dir>/browser" should be passed to xpcshell.

https://searchfox.org/mozilla-central/rev/4b88e0b8cca115009e82fdd65e5bf5812ff99128/testing/xpcshell/runxpcshelltests.py#551-552,558-559

That does not work on Android because:

  • "firefox-appdir" is recognized when it matches mozinfo["appname"]+"-appdir", but on Android mozinfo["appname"] == "fennec"

https://searchfox.org/mozilla-central/rev/4b88e0b8cca115009e82fdd65e5bf5812ff99128/testing/xpcshell/runxpcshelltests.py#1676-1682

  • <dir>/browser is never pushed to the device

Why is this a problem?

  • that -a argument is removed from the Android command line, in favor of --greomni

This seems not to be true these days.

This is an example of the command executed when ./mach xpcshell-test is run:
testing/xpcshell/example/unit/test_do_check_matches.js | full command: ['/data/local/tmp/test_root/xpcb/xpcw', '-g', '/data/local/tmp/test_root/xpcb', '--greomni', '/data/local/tmp/test_root/xpcb/geckoview-withGeckoBinaries-debug-androidTest.apk', '-m', '-e', 'const _HEAD_JS_PATH = "/data/local/tmp/test_root/xpc/head.js";', '-e', 'const _MOZINFO_JS_PATH = "/data/local/tmp/test_root/xpc/p/2400820c-f02c-41cb-ae40-7d721921697e/mozinfo.json";', '-e', 'const _PREFS_FILE = "/data/local/tmp/test_root/xpc/user.js";', '-e', 'const _TESTING_MODULES_DIR = "/data/local/tmp/test_root/xpc/m";', '-f', '/data/local/tmp/test_root/xpc/head.js', '-e', 'const _HEAD_FILES = [];', '-e', 'const _JSDEBUGGER_PORT = 0;', '-e', 'const _TEST_CWD = "/data/local/tmp/test_root/xpc/testing/xpcshell/example/unit";', '-e', 'const _TEST_FILE = ["test_do_check_matches.js"];', '-e', 'const _TEST_NAME = "testing/xpcshell/example/unit/test_do_check_matches.js";', '-e', '_execute_test(); quit(0);']

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.