[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
You can run the unit tests of the ns-3
distribution by running the "check"
command,
./waf check
You should see a report from each unit test that executes indicating that the test has passed.
~/repos/ns-3-dev > ./waf check Entering directory `/home/craigdo/repos/ns-3-dev/build' Compilation finished successfully PASS AddressHelper PASS Wifi PASS DcfManager ... PASS Object PASS Ptr PASS Callback ~/repos/ns-3-dev >
This command is typically run by users
to quickly verify that an
ns-3
distribution has built correctly.
You can also run our regression test suite to ensure that your distribution and tool chain have produced binaries that generate output that is identical to reference output files stored in a central location. To run the regression tests, you provide Waf with the regression flag.
./waf --regression
Waf will verify that the current files in the ns-3
distribution are
built and will then look for trace files in the aforementioned centralized
location. If your tool chain includes Mercurial, the regression tests will
be downloaded from a repository at code.nsnam.org
. If you do not have
Mercurial installed, the reference traces will be downloaded from a tarball
located in the releases section of www.nsnam.org
. The particular name
of the reference trace location is built from the ns-3
version
located in the VERSION file, so don't change that string yourself unless you
know what you are doing.
Once the reference traces are downloaded to your local machine, Waf will run a number of tests that generate what we call trace files. The content of these trace files are compared with the reference traces just downloaded. If they are identical, the regression tests report a PASS status. If the regression tests pass, you should see something like,
~/repos/ns-3-dev > ./waf --regression Entering directory `/home/craigdo/repos/ns-3-dev/build' Compilation finished successfully ========== Running Regression Tests ========== Synchronizing reference traces using Mercurial. http://code.nsnam.org/ns-3-dev-ref-traces Done. PASS test-csma-broadcast PASS test-csma-multicast PASS test-csma-one-subnet PASS test-csma-packet-socket PASS test-simple-error-model PASS test-simple-global-routing PASS test-simple-point-to-point-olsr PASS test-tcp-large-transfer PASS test-udp-echo ~/repos/ns-3-dev >
If a regression tests fails you will see a FAIL indication along with a pointer to the offending trace file and its associated reference trace file along with a suggestion on diff parameters and options in order to see what has gone awry.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on July, 20 2008 using texi2html 1.76.