|
|
| 459 |
Running Tests |
459 |
Running Tests |
| 460 |
+++++++++++++ |
460 |
+++++++++++++ |
| 461 |
|
461 |
|
| 462 |
Tests are typically run using the high level ``test.py`` program. They |
462 |
Tests are typically run using the high level ``test.py`` program. To get a list of the available command-line options, run ``test.py --help`` |
| 463 |
can also be run manually using a low level test-runner executable directly |
463 |
|
| 464 |
from ``waf``. |
|
|
| 465 |
|
464 |
|
| 466 |
Running Tests Under the Test Runner Executable |
465 |
Debugging Tests |
| 467 |
********************************************** |
466 |
*************** |
| 468 |
|
467 |
|
| 469 |
The test-runner is the bridge from generic Python code to |ns3| code. |
468 |
The debugging of the test programs is best performed running the low-level test-runner program. The test-runner is the bridge from generic Python code to |ns3| code. It is written in C++ and uses the automatic test discovery process in the |
| 470 |
It is written in C++ and uses the automatic test discovery process in the |
|
|
| 471 |
|ns3| code to find and allow execution of all of the various tests. |
469 |
|ns3| code to find and allow execution of all of the various tests. |
| 472 |
|
470 |
|
| 473 |
Although it may not be used directly very often, it is good to understand how |
471 |
The main reason why ``test.py`` is not suitable for deugging is that it is not allowed for logging to be turned on using the ``NS_LOG`` environmental variable when test.py runs. This limitation does not apply to the test-runner executable. Hence, if you want to see logging output from your tests, you have to run them using the test-runner directly. |
| 474 |
``test.py`` actually runs the various tests. |
|
|
| 475 |
|
472 |
|
| 476 |
In order to execute the test-runner, you run it like any other ns-3 executable |
473 |
In order to execute the test-runner, you run it like any other ns-3 executable |
| 477 |
-- using ``waf``. To get a list of available options, you can type:: |
474 |
-- using ``waf``. To get a list of available options, you can type:: |