Closed Bug 1635563 Opened 1 year ago Closed 1 year ago

Support kaios in 'mach xpcshell-test'

Categories

(Testing :: XPCShell Harness, enhancement, P2)

Version 3
enhancement

Tracking

(firefox78 fixed)

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

(Whiteboard: [kaios])

Attachments

(1 file, 1 obsolete file)

I have a proof of concept in progress, for running xpcshell tests from mach, against the kaios emulator.

Whiteboard: [kaios]

To run mach from <b2g>/gecko, I find I need something like:

export MOZCONFIG=<b2g>/gecko/mozconfig-b2g
export MOZ_OBJDIR=<b2g>/objdir-gecko
export GECKO_OBJDIR=<b2g>/objdir-gecko
export PLATFORM_VERSION=29

When 'mach xpcshell-test' sets up the test files, it seems to parse all known test manifests, including mochitest manifests. A couple of the test manifests in <b2g>/gecko/b2g have support file references to non-existent files. I found I had to remove those bad references.

It seems to take about 20 seconds to initialize mozdevice and another 7 minutes to push all the xpcshell files to the arm emulator: We really need to switch to a faster emulator as soon as possible.

A very preliminary proof-of-concept demonstrating how we may be able to run
xpcshell tests on KaiOS.
Most code is copied from remotexpcshelltests.py; we may want to consolidate in future.
Currently this executes xpcshell on the KaiOS emulator, but xpcshell crashes,
possibly while reading the main head.js.

Once mach has setup the device, you can 'adb shell' and try to run things manually in the emulator. I find:

cd /data/local/xpcb
export LD_LIBRARY_PATH=/data/local/xpcb
./xpcshell -g /data/local/xpcb -a /data/local/xpcb -r /data/local/xpc/c/httpd.manifest -m # works - gives working js> prompt
./xpcshell -g /data/local/xpcb -a /data/local/xpcb -r /data/local/xpc/c/httpd.manifest -m -f /data/local/xpc/head.js # crashes

I don't see any minidumps created. Logcat shows the crash, but there are no libxul symbols and no obvious error messages prior to the crash.

Severity: -- → N/A
Priority: -- → P2
Attachment #9145992 - Attachment is obsolete: true

Support 'mach xpcshell-test' in a KaiOS environment. This is very much like running
xpcshell in an android/geckoview environment except:

  • instead of using an APK for the gre, use the omnijar
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/775e1e4cba9d
Initial kaios support for 'mach xpcshell-test'; r=bc
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.