how to run the b2g emulator cppunit tests?

Hi friends!

I'm currently working on a networking patch for b2g (bug 1008091), but when I 
send it on a try-run adventure I get cppunit test failures on the b2g 
emulator.

So, I built my own emulator locally and I want to run the cppunit test to see 
for myself what happens and track down the problem with my patch.

How do I run the cppunit tests like the try run do? My searches seem to fail 
me.

-- 

  / daniel.haxx.se
0
Daniel
10/28/2014 10:58:09 AM
mozilla.dev.b2g 4036 articles. 0 followers. Post Follow

2 Replies
448 Views

Similar Articles

[PageSpeed] 48

On Tuesday, 28 October 2014 06:59:15 UTC-4, Daniel Stenberg  wrote:
> Hi friends!
>=20
> I'm currently working on a networking patch for b2g (bug 1008091), but wh=
en I=20
> send it on a try-run adventure I get cppunit test failures on the b2g=20
> emulator.
>=20
> So, I built my own emulator locally and I want to run the cppunit test to=
 see=20
> for myself what happens and track down the problem with my patch.
>=20
> How do I run the cppunit tests like the try run do? My searches seem to f=
ail=20
> me.
>=20
> --=20
>=20
>   / daniel.haxx.se

This isn't as easy as it could be. I've filed Bug 1090276 to add a mach tar=
get for this. In the meantime, here goes:

First, you'll want stripped versions of the tests and libraries. This can b=
e done by running make package and make package-tests from objdir-gecko. Th=
e unstripped versions will take a *long* time to push to the emulator and t=
here many not be enough space for them.

To run the tests:
* cd gecko/testing
* virtualenv venv  # create a virtual environment
* . venv/bin/activate  # activate it
* python mozbase/setup_development.py  # install mozbase
* python remotecppunittests.py --with-b2g-emulator B2G_HOME --dm_trans=3Dad=
b --xre-path ../../objdir-gecko/dist/b2g --localLib ../../objdir-gecko/dist=
/b2g ../../objdir-gecko/dist/test-stage/cppunittests

B2G_HOME should be the root of your B2G checkout (e.g. ~/B2G). If you want =
to run a single test, you can pass in the path to it as the last argument r=
ather than the path to the cppunittests directory.

Feel free to ping me on irc if you enounter any trouble, I'm dminor on #ate=
am.

Dan
0
daniel
10/28/2014 4:09:14 PM
On Tue, 28 Oct 2014, daniel.minor@gmail.com wrote:

>> How do I run the cppunit tests like the try run do? My searches seem to fail
>> me.

> This isn't as easy as it could be. I've filed Bug 1090276 to add a mach 
> target for this.

Yeah, that was what I originally assumed I would be able to use and it'd be 
nice. =)

> In the meantime, here goes:

Thanks a lot! I was able to get them running now using these clear 
instructions.

-- 

  / daniel.haxx.se
0
Daniel
10/29/2014 9:35:26 AM
Reply: