Bug 1120 - NS_LOG environment variable not working with test.py
authorMitch Watrous <watrous@u.washington.edu>
Tue, 05 Jul 2011 13:27:30 -0700
changeset 7392 99762b541ef9
parent 7391 30af4f227b21
child 7393 3c68eb316f5f
Bug 1120 - NS_LOG environment variable not working with test.py
doc/manual/source/test-framework.rst
src/spectrum/model/single-model-spectrum-channel.h
--- a/doc/manual/source/test-framework.rst	Tue Jul 05 19:25:18 2011 +0100
+++ b/doc/manual/source/test-framework.rst	Tue Jul 05 13:27:30 2011 -0700
@@ -459,19 +459,16 @@
 Running Tests
 +++++++++++++
 
-Tests are typically run using the high level ``test.py`` program.  They
-can also be run manually using a low level test-runner executable directly
-from ``waf``.  
+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``
+ 
 
-Running Tests Under the Test Runner Executable
-**********************************************
+Debugging Tests
+***************
 
-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 
+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 
 |ns3| code to find and allow execution of all of the various tests.
 
-Although it may not be used directly very often, it is good to understand how
-``test.py`` actually runs the various tests.
+The main reason why ``test.py`` is not suitable for debugging 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.
 
 In order to execute the test-runner, you run it like any other ns-3 executable
 -- using ``waf``.  To get a list of available options, you can type::
--- a/src/spectrum/model/single-model-spectrum-channel.h	Tue Jul 05 19:25:18 2011 +0100
+++ b/src/spectrum/model/single-model-spectrum-channel.h	Tue Jul 05 13:27:30 2011 -0700
@@ -23,6 +23,7 @@
 
 
 #include <ns3/spectrum-channel.h>
+#include <ns3/spectrum-model.h>
 
 namespace ns3 {