Getting mochitests to work against b2g-desktop on OSX. Need help (!!)

I can't get this shit to work, and already spent four hours on it.

I have a working b2g-desktop build.

$OBJDIR/dist/B2G.app/Contents/MacOS/b2g -profile $GAIADIR/profile-debug

Now I want to run mochitests so I follow all the instructions on https://de=
veloper.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testin=
g/Mochitests?redirectlocale=3Den-US&redirectslug=3DMozilla%2FFirefox_OS%2FP=
latform%2FTesting%2FMochitests

$ cd $OBJDIR/_tests/testing/mochitest
$ python runtestsb2g.py --desktop --console-level INFO --profile $GAIADIR/p=
rofile-debug
Traceback (most recent call last):
  File "runtestsb2g.py", line 380, in <module>
    main()
  File "runtestsb2g.py", line 375, in main
    run_desktop_mochitests(parser, options)
  File "runtestsb2g.py", line 354, in run_desktop_mochitests
    if options.app[-4:] =3D=3D '-bin':
TypeError: 'NoneType' object is not subscriptable

So this stuff doesn't work. Alright, so I digg deeper and I end up with:

$ python runtestsb2g.py --desktop --app $OBJDIR/dist/B2G.app/Contents/MacOS=
/b2g --profile ~/repos/gaia/profile-debug --utility-path $OBJDIR/dist/bin/

Now b2g desktop shows up with an all white screen, and the stdout just stal=
ls...

INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/xpcshell -g /Users/janjongboom/repos/mozilla-central/obj-b=
2g/dist/B2G.app/Contents/MacOS -v 170 -f /Users/janjongboom/repos/mozilla-c=
entral/obj-b2g/_tests/testing/mochitest/httpd.js -e "const _PROFILE_PATH =
=3D '/var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp'; const _SE=
RVER_PORT =3D '8888'; const _SERVER_ADDR =3D '127.0.0.1'; const _TEST_PREFI=
X =3D undefined; const _DISPLAY_RESULTS =3D false;" -f ./server.js
Mochitest INFO | runtests.py | Server pid: 44994
INFO | automation.py | Launching: /usr/bin/python /Users/janjongboom/repos/=
mozilla-central/obj-b2g/_tests/testing/mochitest/pywebsocket_wrapper.py -p =
9988 -w /Users/janjongboom/repos/mozilla-central/obj-b2g/_tests/testing/moc=
hitest -l /Users/janjongboom/repos/mozilla-central/obj-b2g/_tests/testing/m=
ochitest/websock.log --log-level=3Ddebug --allow-handlers-outside-root-dir
Mochitest INFO | runtests.py | Websocket server pid: 44995
Mochitest INFO | runtests.py | Running tests: start.

INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -N -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th000=
0gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4o=
Tp/.crtdbpw
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/bug483440-attack2b.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g=
_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/=
tmpIb4oTp/.crtdbpw -n bug483440-attack2b -t CT,,
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/bug483440-attack7.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_=
5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/t=
mpIb4oTp/.crtdbpw -n bug483440-attack7 -t CT,,
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/bug483440-pk10oflo.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g=
_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/=
tmpIb4oTp/.crtdbpw -n bug483440-pk10oflo -t CT,,
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/evintermediate.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th=
0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpI=
b4oTp/.crtdbpw -n evintermediate -t CT,,
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/evroot.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T=
/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.c=
rtdbpw -n evroot -t CT,,
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/jartests-object.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5t=
h0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmp=
Ib4oTp/.crtdbpw -n jartests-object -t CT,,CT
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/pk12util -i /Users/janjongboom/repos/mozilla-central/build=
/pgo/certs/mochitest.client -w /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000=
gn/T/tmpIb4oTp/.crtdbpw -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T=
/tmpIb4oTp
pk12util: PKCS12 IMPORT SUCCESSFUL
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/bu=
ild/pgo/certs/pgoca.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/=
tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.cr=
tdbpw -n pgoca -t CT,,
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/bin/ssltunnel /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T=
/tmpIb4oTp/ssltunnel.cfg
INFO | automation.py | SSL tunnel pid: 45005
INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/=
obj-b2g/dist/B2G.app/Contents/MacOS/b2g -foreground -profile /var/folders/t=
8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/
INFO | automation.py | Application pid: 45006
Server listening on port 4443 with cert pgo server certificate
*** ERROR addons.xpi: Error during startup file checks: ReferenceError: Add=
onManagerPrivate is not defined (resource://gre/modules/XPIProvider.jsm -> =
resource://gre/modules/XPIProviderUtils.js:683)
browser-helper: Can't load the devtools panel. Likely because this version =
of Gecko is too old
1377864081796	Marionette	INFO	MarionetteComponent loaded
desktop-helper: +++ loading scripts for app: resource://gre-resources/hidde=
nWindow.html

Identity SignInToWebsiteController: persona uri =3D https://firefoxos.perso=
na.org
############################### browserElementPanning.js loaded
************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'Failure' when calling method: [nsIPromptFactory::getPrompt]=
"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "native frame :: <u=
nknown filename> :: <TOP_LEVEL> :: line 0"  data: no]
************************************************************

What am I missing? Running python 2.7.5.
0
Jan
8/30/2013 12:02:08 PM
mozilla.dev.b2g 4036 articles. 0 followers. Post Follow

2 Replies
365 Views

Similar Articles

[PageSpeed] 56

FYI, Here is my .mozconfig:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-b2g
mk_add_options MOZ_MAKE_FLAGS="-j8"
mk_add_options ENABLE_MARIONETTE=1
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-application=b2g
ac_add_options --enable-debug-symbols
ac_add_options --enable-profiling
ac_add_options --with-ccache
ac_add_options --enable-marionette
export CXXFLAGS=-DMOZ_ENABLE_JS_DUMP

0
Jan
8/30/2013 12:12:11 PM
Does the situation improve if you use a regular gaia profile, rather 
than a debug one?  I'm not sure that the kind of profile modifications 
that mochitest performs are compatible with debug profiles.

Jonathan

On 8/30/2013 5:02 AM, Jan Jongboom wrote:
> I can't get this shit to work, and already spent four hours on it.
>
> I have a working b2g-desktop build.
>
> $OBJDIR/dist/B2G.app/Contents/MacOS/b2g -profile $GAIADIR/profile-debug
>
> Now I want to run mochitests so I follow all the instructions on https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Automated_testing/Mochitests?redirectlocale=en-US&redirectslug=Mozilla%2FFirefox_OS%2FPlatform%2FTesting%2FMochitests
>
> $ cd $OBJDIR/_tests/testing/mochitest
> $ python runtestsb2g.py --desktop --console-level INFO --profile $GAIADIR/profile-debug
> Traceback (most recent call last):
>    File "runtestsb2g.py", line 380, in <module>
>      main()
>    File "runtestsb2g.py", line 375, in main
>      run_desktop_mochitests(parser, options)
>    File "runtestsb2g.py", line 354, in run_desktop_mochitests
>      if options.app[-4:] == '-bin':
> TypeError: 'NoneType' object is not subscriptable
>
> So this stuff doesn't work. Alright, so I digg deeper and I end up with:
>
> $ python runtestsb2g.py --desktop --app $OBJDIR/dist/B2G.app/Contents/MacOS/b2g --profile ~/repos/gaia/profile-debug --utility-path $OBJDIR/dist/bin/
>
> Now b2g desktop shows up with an all white screen, and the stdout just stalls...
>
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/xpcshell -g /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/B2G.app/Contents/MacOS -v 170 -f /Users/janjongboom/repos/mozilla-central/obj-b2g/_tests/testing/mochitest/httpd.js -e "const _PROFILE_PATH = '/var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = false;" -f ./server.js
> Mochitest INFO | runtests.py | Server pid: 44994
> INFO | automation.py | Launching: /usr/bin/python /Users/janjongboom/repos/mozilla-central/obj-b2g/_tests/testing/mochitest/pywebsocket_wrapper.py -p 9988 -w /Users/janjongboom/repos/mozilla-central/obj-b2g/_tests/testing/mochitest -l /Users/janjongboom/repos/mozilla-central/obj-b2g/_tests/testing/mochitest/websock.log --log-level=debug --allow-handlers-outside-root-dir
> Mochitest INFO | runtests.py | Websocket server pid: 44995
> Mochitest INFO | runtests.py | Running tests: start.
>
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -N -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/bug483440-attack2b.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n bug483440-attack2b -t CT,,
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/bug483440-attack7.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n bug483440-attack7 -t CT,,
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/bug483440-pk10oflo.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n bug483440-pk10oflo -t CT,,
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/evintermediate.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n evintermediate -t CT,,
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/evroot.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n evroot -t CT,,
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/jartests-object.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n jartests-object -t CT,,CT
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/pk12util -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/mochitest.client -w /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp
> pk12util: PKCS12 IMPORT SUCCESSFUL
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/certutil -A -i /Users/janjongboom/repos/mozilla-central/build/pgo/certs/pgoca.ca -d /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp -f /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/.crtdbpw -n pgoca -t CT,,
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/bin/ssltunnel /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/ssltunnel.cfg
> INFO | automation.py | SSL tunnel pid: 45005
> INFO | automation.py | Launching: /Users/janjongboom/repos/mozilla-central/obj-b2g/dist/B2G.app/Contents/MacOS/b2g -foreground -profile /var/folders/t8/pz9nttjd4yq8_j60t67g_5th0000gn/T/tmpIb4oTp/
> INFO | automation.py | Application pid: 45006
> Server listening on port 4443 with cert pgo server certificate
> *** ERROR addons.xpi: Error during startup file checks: ReferenceError: AddonManagerPrivate is not defined (resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js:683)
> browser-helper: Can't load the devtools panel. Likely because this version of Gecko is too old
> 1377864081796	Marionette	INFO	MarionetteComponent loaded
> desktop-helper: +++ loading scripts for app: resource://gre-resources/hiddenWindow.html
>
> Identity SignInToWebsiteController: persona uri = https://firefoxos.persona.org
> ############################### browserElementPanning.js loaded
> ************************************************************
> * Call to xpconnect wrapped JSObject produced this error:  *
> [Exception... "'Failure' when calling method: [nsIPromptFactory::getPrompt]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]
> ************************************************************
>
> What am I missing? Running python 2.7.5.
> _______________________________________________
> dev-b2g mailing list
> dev-b2g@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-b2g

0
Jonathan
9/3/2013 10:02:53 PM
Reply: