Auto-tools/Projects/Mozbase: Difference between revisions

(Add missing double quote to initial setup command)
Line 87: Line 87:
You will need [http://www.gnu.org/software/make/manual/make.html make] and [http://gcc.gnu.org/ gcc] in order to run the tests.  If you're running windows, this is available in [https://developer.mozilla.org/en/Windows_Build_Prerequisites#MozillaBuild_.2F_Pymake MozillaBuild].
You will need [http://www.gnu.org/software/make/manual/make.html make] and [http://gcc.gnu.org/ gcc] in order to run the tests.  If you're running windows, this is available in [https://developer.mozilla.org/en/Windows_Build_Prerequisites#MozillaBuild_.2F_Pymake MozillaBuild].


Ensure that all mozbase packages are installed as the tests require them as well as 3rd party packages using 'python setup_development.py --extra'.
Then, from the root of mozilla-central, run:


Then run the [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/test.py test.py] test runner from the root of the git repository:
    $ ./mach python-test testing/mozbase


    $ python test.py
This will run all tests from every mozbase module. You can run individual tests by passing in that directory specifically, e.g:


This will run all tests from [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/test-manifest.ini test-manifest.ini] which is parsed with [http://mxr.mozilla.org/mozilla-central/source/testing/mozbase/manifestdestiny ManifestDestiny].  On success 'test.py' should print the number of tests run and 'OK':
    $ ./mach python-test testing/mozbase/mozprocess
 
    ----------------------------------------------------------------------
    Ran 56 tests in 114.807s
   
    OK


==== Mozbase Testing Framework ====
==== Mozbase Testing Framework ====
Confirmed users
656

edits