Closed
Bug 685068
Opened 13 years ago
Closed 7 years ago
xpcshell test js/ductwork/debugger/tests/test_nativewrappers.js fails on Android
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: gbrown, Unassigned)
Details
(Whiteboard: [mobile-testing][xpcshell])
With patches for bug 668349 and 668351, xpcshell tests can be run on an Android device, and the majority of tests pass.
However, js/ductwork/debugger/tests/test_nativewrappers.js consistently fails when run on Android.
![]() |
Reporter | |
Comment 1•13 years ago
|
||
geoff@geoff-MacBookPro:~/src/mozilla-central/objdir-droid$ make SOLO_FILE=test_nativewrappers.js -C js/ductwork/debugger check-one-remote
make: Entering directory `/home/geoff/src/mozilla-central/objdir-droid/js/ductwork/debugger'
/usr/bin/python2.6 -u ../../../../config/pythonpath.py \
-I../../../../build \
-I../../../../build/mobile \
../../../../testing/xpcshell/remotexpcshelltests.py \
--symbols-path=../../../dist/crashreporter-symbols \
--build-info-json=../../../mozinfo.json \
--test-path=test_nativewrappers.js \
--profile-name=fennec \
--verbose \
\
--dm_trans=adb \
--deviceIP= \
--objdir=../../.. \
--noSetup \
../../../_tests/xpcshell/js/ductwork/debugger/tests
201 KB/s (13771 bytes in 0.066s)
will execute commands via run-as org.mozilla.fennec_geoff
using APK: ../../../dist/fennec-9.0a1.en-US.eabi-arm.apk
chmod /data/local/tests/xpcshell/p
TEST-INFO | profile dir is /data/local/tests/xpcshell/p
TEST-INFO | /home/geoff/src/mozilla-central/objdir-droid/_tests/xpcshell/js/ductwork/debugger/tests/test_nativewrappers.js | running test ...
cd /data/local/tests/xpcshell/js/ductwork/debugger/tests; LD_LIBRARY_PATH=/data/local/tests/xpcshell/b; export CACHE_PATH=/data/local/tests/xpcshell/b; export GRE_HOME=/data/data/org.mozilla.fennec_geoff; export XPCSHELL_TEST_PROFILE_DIR=/data/local/tests/xpcshell/p; /data/local/tests/xpcshell/b/xpcshell -r /data/local/tests/xpcshell/c/httpd.manifest --greomni /data/local/tests/xpcshell/b/fennec-9.0a1.en-US.eabi-arm.apk -j -s -e 'const _HTTPD_JS_PATH = "/data/local/tests/xpcshell/c/httpd.js";' -e 'const _HEAD_JS_PATH = "/data/local/tests/xpcshell/head.js";' -f /data/local/tests/xpcshell/head.js -e 'const _SERVER_ADDR = "localhost"' -e 'const _HEAD_FILES = ["head_dbg.js"];' -e 'const _TAIL_FILES = [];' -e 'const _TEST_FILE = ["test_nativewrappers.js"];' -e '_execute_test(); quit(0);'
TEST-KNOWN-FAIL | /home/geoff/src/mozilla-central/objdir-droid/_tests/xpcshell/js/ductwork/debugger/tests/test_nativewrappers.js | test passed (time: 965.085ms)
>>>>>>>
TEST-INFO | (xpcshell/head.js) | test 1 pending
TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIXPCComponents_Utils.import]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: test_nativewrappers.js :: run_test :: line 3" data: no]
<<<<<<<
INFO | Result summary:
INFO | Passed: 0
INFO | Failed: 0
INFO | Todo: 1
make: Leaving directory `/home/geoff/src/mozilla-central/objdir-droid/js/ductwork/debugger'
![]() |
Reporter | |
Updated•13 years ago
|
Whiteboard: [mobile-testing][xpcshell]
Comment 2•13 years ago
|
||
I'm familiar with this test and AFAICT it fails because the resource in the following statement cannot be found:
Components.utils.import("resource://gre/modules/jsdebugger.jsm");
I don't know how mobile Firefox is packaged, do you happen to know why that would be the case?
![]() |
Reporter | |
Comment 3•13 years ago
|
||
(In reply to Panos Astithas [:past] from comment #2)
These tests were run with "make xpcshell-tests-remote", which mostly invokes testing/xpcshell/remotexpcshelltests.py, which copies files to the Android device and then invokes xpcshell. There is some info here: https://wiki.mozilla.org/Mobile/Fennec/Android#xpcshell
remotexpcshelltests.py does not copy jsdebugger.jsm to the device, so that seems to be a problem. I haven't been able to figure out where to copy it to...do you know what "resource://gre/modules/jsdebugger.jsm" translates to, in terms of a path on the filesystem?
Comment 4•13 years ago
|
||
If you mean path in the source tree:
js/ductwork/debugger/jsdebugger.jsm
If you mean deployment path:
modules/jsdebugger.jsm
which is inside omni.jar for desktop Firefox. gre is an alias to the location of the XUL runtime:
https://developer.mozilla.org/en/JavaScript_code_modules/Using#Extending_resource:_URLs
![]() |
Reporter | |
Comment 5•13 years ago
|
||
Thanks. I meant deployment path: If I can determine where to copy jsdebugger.jsm to on the Android device, this should be simple to fix.
Note, from comment 1, we use a --greomni argument:
--greomni /data/local/tests/xpcshell/b/fennec-9.0a1.en-US.eabi-arm.apk
but I'm sure jsdebugger.jsm is not in the apk, and shouldn't be.
There's also:
export GRE_HOME=/data/data/org.mozilla.fennec_geoff
I tried creating /data/data/org.mozilla.fennec_geoff/modules/jsdebugger.jsm -- it didn't help.
Comment 6•13 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #5)
> Thanks. I meant deployment path: If I can determine where to copy
> jsdebugger.jsm to on the Android device, this should be simple to fix.
>
> Note, from comment 1, we use a --greomni argument:
>
> --greomni /data/local/tests/xpcshell/b/fennec-9.0a1.en-US.eabi-arm.apk
>
> but I'm sure jsdebugger.jsm is not in the apk, and shouldn't be.
Can you elaborate on that? Why shouldn't this module be included? Aren't other modules already there? The debugger is now an important part of SpiderMonkey and this tiny module exposes that functionality to JS code.
![]() |
Reporter | |
Comment 7•13 years ago
|
||
Sorry - I was completely wrong about that: modules/jsdebugger.jsm *is* in the apk. I wonder why it isn't being found.
![]() |
Reporter | |
Comment 8•13 years ago
|
||
I traced this a little today, but did not find the cause of the failure. It looks like the --greomni correctly sets the apk for resource://gre requests. Also, nsZipArchive::GetData succeeds for the modules/jsdebugger.jsm request -- it appears to successfully retrieve the file data.
I am on vacation for a few days...will look into it further on my return, if needed.
![]() |
Reporter | |
Comment 9•13 years ago
|
||
jsdebugger.jsm is successfully retrieved from the apk but js::Interpret fails (returns false)...I do not know the cause of the failure.
Comment 10•13 years ago
|
||
IIRC Firefox Mobile has the methodjit (or something) disabled? Could that be related? Perhaps jorendorff has some ideas.
Comment 11•7 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•