Bug 1695

Summary: improve test.py output when -g selected without valgrind
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: test frameworkAssignee: Mitch Watrous <watrous>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   

Description Tom Henderson 2013-06-11 15:00:31 UTC
When a user issues 'test.py -g' on a system without valgrind, it reports many crashes, which has confused at least one user.

CRASH: TestSuite attributes
CRASH: TestSuite command-line
CRASH: TestSuite callback
...

A nicer output would be to print something like what is printed when test.py is run when tests are disabled, such as modifying the below:

***  Note: ns-3 tests are currently disabled. Enable them by adding
***  "--enable-tests" to ./waf configure or modifying your .ns3rc file.
Comment 1 Mitch Watrous 2013-06-13 14:34:23 UTC
Bug closed.

ns-3-dev changeset: 8a9f775a4cba
Comment 2 Mitch Watrous 2013-06-13 17:47:26 UTC
The reason this bug was reopened is that you have to do a ./waf configure in order to know if valgrind is installed or not.

I assumed people would always do the configure step first, but that is not always the case.

I'm not sure if this bug can be fixed correctly without forcing people to do the configure step because that is when the waf configuration file gets written that tells test.py if valgrind is installed or not.
Comment 3 Mitch Watrous 2013-06-13 18:27:38 UTC
(In reply to comment #2)
> The reason this bug was reopened is that you have to do a ./waf configure in
> order to know if valgrind is installed or not.
> 
> I assumed people would always do the configure step first, but that is not
> always the case.
> 
> I'm not sure if this bug can be fixed correctly without forcing people to do
> the configure step because that is when the waf configuration file gets written
> that tells test.py if valgrind is installed or not.

In test.py, I can assume valgrind is there and not print any warning about valgrind being missing until people do the waf configure step, which is essentially what is done now since there is never any valgrind-missing warning printed.

That would mean that the warning message could suddenly appear after waf configure was done and the next time test.py was run.
Comment 4 Mitch Watrous 2013-06-14 19:32:57 UTC
Bug closed again.

ns-3-dev changeset: 02642e139f19