Testsuite needs to run in pbuilder.

Bug #1097531 reported by Robert Bruce Park
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
WebApps: unity-firefox-extension
Confirmed
High
Unassigned

Bug Description

Hello,

Ken VanDine and I are responsible for enabling autolanding of packages in raring, but before we can do this, we need to ensure that they have good test suites.

In this package I can see that there's a directory called tests and another called html-tests. It's good to see that the tests exist, but we need to set them up to run in debian/rules, so that pbuilder will run the tests, and prevent broken code from getting shipped directly to users.

This means:

1. Tests must be *thoroughly* mocked, so that they don't depend on any technology that won't be present inside a pbuilder environment

2. Tests need to actually be run.

I set up debian/rules to run 'sh ./tests/run.sh' during the build and I got the following error:

make[1]: Leaving directory `/home/robru/Packages/build-area/unity-firefox-extension-2.4.3'
   debian/rules override_dh_auto_test
make[1]: Entering directory `/home/robru/Packages/build-area/unity-firefox-extension-2.4.3'
sh ./tests/run.sh
xargs: mozmill: No such file or directory
make[1]: *** [override_dh_auto_test] Error 127
make[1]: Leaving directory `/home/robru/Packages/build-area/unity-firefox-extension-2.4.3'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1357:
dpkg-buildpackage -rfakeroot -D -us -uc failed
bzr: ERROR: The build failed.

So if somebody could help me fix that up we could get this auto-landing, that would be super. Thanks! ;-)

Changed in unity-firefox-extension:
status: New → Confirmed
Revision history for this message
Víctor R. Ruiz (vrruiz) wrote : Re: [Bug 1097531] [NEW] Testsuite needs to run in pbuilder.

Hi Robert.

mozmill needs to be installed via python-pip:

# pip install mozmill

However, this are functional tests, not ment to be executed during the
continuous integration/autolanding (per Product Strategy rules, only
unit tests are executed).

Revision history for this message
Robert Bruce Park (robru) wrote :

Victor, pip tells me mozmill is already installed.

$ sudo pip install mozmill --upgrade
Requirement already up-to-date: mozmill in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: jsbridge==2.4.15 in /usr/local/lib/python2.7/dist-packages (from mozmill)
Requirement already up-to-date: mozrunner==2.5.13 in /usr/local/lib/python2.7/dist-packages (from mozmill)
Requirement already up-to-date: ManifestDestiny==0.2.2 in /usr/local/lib/python2.7/dist-packages (from mozmill)
Downloading/unpacking simplejson from http://pypi.python.org/packages/source/s/simplejson/simplejson-3.0.5.tar.gz#md5=8223d7e17d631a4740a45d4f9d6d1c0d (from jsbridge==2.4.15->mozmill)
  Downloading simplejson-3.0.5.tar.gz (59Kb): 59Kb downloaded
  Running setup.py egg_info for package simplejson

Installing collected packages: simplejson
  Found existing installation: simplejson 2.6.2
    Uninstalling simplejson:
      Successfully uninstalled simplejson
  Running setup.py install for simplejson
    building 'simplejson._speedups' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7 -c simplejson/_speedups.c -o build/temp.linux-x86_64-2.7/simplejson/_speedups.o
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/simplejson/_speedups.o -o build/lib.linux-x86_64-2.7/simplejson/_speedups.so

Successfully installed simplejson
Cleaning up...

If you say that this testsuite is not suitable for continuous-integration, then we'll need a new one to be written that is suitable.

David King (amigadave)
Changed in unity-firefox-extension:
importance: Undecided → High
Revision history for this message
Víctor R. Ruiz (vrruiz) wrote :

Robert: While I agree that having tests is necessary, this is a _browser extension_. The whole browser is needed to test the extension, and no small testing is then possible.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@vvruiz: we can have as well integration tests running and collected from autopilot. Those will be run with the installed package ;)

Revision history for this message
Robert Bruce Park (robru) wrote :

@vrruiz: Untested code is broken code ;-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.