Bug 1108

Summary: test.py -e option needs repair
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: test frameworkAssignee: Mitch Watrous <watrous>
Status: RESOLVED FIXED    
Severity: normal CC: ns-bugs, tomh
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   

Description Tom Henderson 2011-04-20 00:14:33 EDT
./test.py -e results in CRASH output
Comment 1 Mitch Watrous 2011-04-20 12:59:23 EDT
Unlike test suites, you have to include the path when you run an example like this:

    ./test.py -e tutorial/first
    ./test.py -e ../src/mobility/examples/mobility-example

Right now, the path to the example is relative starting at

    build/debug/examples

I propose making the path be relative starting at

    build/debug

so that these would work:

    ./test.py -e examples/tutorial/first
    ./test.py -e src/mobility/examples/mobility-example
Comment 2 Tom Henderson 2011-04-21 00:37:34 EDT
(In reply to comment #1)
> Unlike test suites, you have to include the path when you run an example like
> this:
> 
>     ./test.py -e tutorial/first
>     ./test.py -e ../src/mobility/examples/mobility-example
> 
> Right now, the path to the example is relative starting at
> 
>     build/debug/examples
> 
> I propose making the path be relative starting at
> 
>     build/debug
> 
> so that these would work:
> 
>     ./test.py -e examples/tutorial/first
>     ./test.py -e src/mobility/examples/mobility-example

I agree it is more intuitive, but we may want to provide a new option (-p?) that defaults to build/debug but would allow to override where to search, such as opt/ or dbg/ build directories in the proposed bake system.
Comment 3 Mitch Watrous 2011-04-26 16:11:39 EDT
I made the path be relative starting at

    build/debug

so that these would work:

    ./test.py -e examples/tutorial/first
    ./test.py -e src/mobility/examples/mobility-example

I also added a new option (--buildpath) to test.py that allows you to specify the directory where ns-3 was built:

  ./test.py --buildpath=/home/watrous/repository/ns-3-allinone/ns-3-dev/build/debug --example=examples/wireless/wifi-simple-adhoc
Comment 4 Mitch Watrous 2011-04-26 16:12:56 EDT
I made the path be relative starting at

    build/debug

so that these would work:

    ./test.py -e examples/tutorial/first
    ./test.py -e src/mobility/examples/mobility-example

I also added a new option (buildpath) to test.py that allows you to specify the directory where ns-3 was built:

  ./test.py --buildpath=/home/watrous/repository/ns-3-allinone/ns-3-dev/build/debug --example=examples/wireless/wifi-simple-adhoc
Comment 5 Mitch Watrous 2011-04-26 16:14:49 EDT
I made the path be relative starting at

    build/debug

so that these would work:

    ./test.py -e examples/tutorial/first
    ./test.py -e src/mobility/examples/mobility-example

I also added a new option (buildpath) to test.py that allows you to specify the directory where ns-3 was built:

  ./test.py --buildpath=/home/watrous/repository/ns-3-allinone/ns-3-dev/build/debug --example=examples/wireless/wifi-simple-adhoc
Comment 6 Mitch Watrous 2011-04-26 16:15:56 EDT
I made the path be relative starting at

    build/debug

so that these would work:

    ./test.py -e examples/tutorial/first
    ./test.py -e src/mobility/examples/mobility-example

I also added a new option (buildpath) to test.py that allows you to specify the directory where ns-3 was built:

  ./test.py --buildpath=/home/watrous/repository/ns-3-allinone/ns-3-dev/build/debug --example=examples/wireless/wifi-simple-adhoc
Comment 7 Mitch Watrous 2011-04-26 16:18:10 EDT
Changeset: 18ae03e01c6f