File: rt

package info (click to toggle)
ns2 2.35%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 78,796 kB
  • sloc: cpp: 172,923; tcl: 107,130; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 816; awk: 525; csh: 355
file content (26 lines) | stat: -rwxr-xr-x 639 bytes parent folder | download | duplicates (8)
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
#! /bin/sh
progname=`basename $0`

if [ -f ns ] ; then
    PROG=./ns
elif [ -f ns.dyn ] ; then
    PROG=./ns.dyn
fi

rm -f out.tr all.tr core
echo $PROG tcl/test/test-suite-$1.tcl $2 $3
if $PROG tcl/test/test-suite-$1.tcl $2 $3 ; then
    if [ ! -f out.tr ] ; then
	echo "$progname: no output?" 1>&2
    else
	if [ -n "$DISPLAY" ] ; then
	    raw2xg -m 90 -s 0.01 out.tr | xgraph 
	else
	    file=`perl -ane '$F[2] =~ s/test_// ; $F[2] =~ s/_/-/g; print $F[2]; exit' out.tr`
	    raw2gp -a out.tr | gnuplot
	    echo "$progname: postscript of graph is in $file.ps"
	fi
    fi
elif [ -f core ] ; then
    echo "$progname: core dump" 1>&2
fi