File: run-examples-with-full-logging.sh

package info (click to toggle)
ns3 3.47-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 106,848 kB
  • sloc: cpp: 633,577; python: 15,491; ansic: 6,773; makefile: 1,959; sh: 1,021; pascal: 632; javascript: 167; perl: 102
file content (31 lines) | stat: -rwxr-xr-x 676 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#
# Copyright (c) 2012 University of Washington
#
# SPDX-License-Identifier: GPL-2.0-only
#

#
# This script calls test.py to get a list of all tests and examples.
# It then runs all of the C++ examples with full logging turned on,
# i.e. NS_LOG="*", to see if that causes any problems with the
# example.
#

cd ..
`./test.py -l >& /tmp/test.out`

while read line
do
  # search for examples, strip down $line as necessary
  if [[ "$line" == example* ]]
    then
      name=${line#example      }
      NS_LOG="*" ./ns3 --run "$name" >& /dev/null
      status="$?"
      echo "program $name status $status"
  fi
done < "/tmp/test.out"

rm -rf /tmp/test.out
cd utils