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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
|
#!/bin/sh
#
# validate -- run all the test scripts
#
# Copyright (c) 1997 University of Southern California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation, advertising
# materials, and other materials related to such distribution and use
# acknowledge that the software was developed by the University of
# Southern California, Information Sciences Institute. The name of the
# University may not be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# $Header: /cvsroot/nsnam/ns-2/validate,v 1.153 2009/11/21 21:12:48 tom_henderson Exp $
try () {
for excluding in $cygwin_exclude; do
if [ "$excluding" = "$1" ]; then
echo "*** $1 skipped (Cygwin)";
return 0;
fi;
done;
echo "*** $1"
$1 quiet || {
any_failed=true
failed_list="$failed_list $1"
}
return $?
}
any_failed=false
failed_list=""
test_cygwin=`uname | tr [a-z] [A-Z] | sed -e 's|.*CYGWIN.*|true|'`;
if [ "${test_cygwin}" = "true" ]; then
echo "Cygwin detected";
echo "Note: Cygwin validation is still considered EXPERIMENTAL";
echo "";
# cygwin_exclude="./test-all-pi";
#echo "$cygwin_exclude will not be run.";
#echo "";
#
# put PI back in the validation - nicolas, 1/15/04
cygwin_exclude="";
else
cygwin_exclude="";
fi;
echo "(Validation can take 1-30 hours to run.)"
cd tcl/test
#
# First run portable tests
#
for i in \
simple tcp testReno newreno sack tcpOptions tcpReset \
simple-full full testReno-full testReno-bayfull sack-full \
tcp-init-win tcpVariants LimTransmit aimd greis rfc793edu rfc2581 rbp \
sctp tcpLinux tcpHighspeed frto friendly realaudio \
ecn ecn-ack ecn-full quickstart diffusion3 smac \
manual-routing lan \
red adaptive-red red-pd rio vq rem gk pi cbq schedule rr monitor jobs \
intserv diffserv webtraf \
mip links linkstate mpls oddBehaviors \
WLtutorial wireless-infra wireless-infra-mobility \
wireless-shadowing wireless-lan-aodv wireless-gridkeeper \
wireless-diffusion wireless-lan-newnode wireless-lan-newnode-80211Ext \
source-routing satellite \
misc tagged-trace message rng xcp wpan \
energy snoop \
packmime delaybox tmix \
# wireless-lan-gaf
# Validation tests that still use full packet headers:
# wireless-shadowing wireless-lan-aodv wireless-tdma wireless-gridkeeper
# wireless-diffusion wireless-lan-newnode satellite WLtutorial energy
# Deleted (old tests that were for compatibility with ns-1 scripts):
# v1 red-v1 cbq-v1 sack-v1 vegas-v1
do
date
try ./test-all-$i
date
sleep 2
done
#
# Repeat for non-portable test set
#
any_portable_failed=$any_failed
any_failed=false
portable_failed_list=$failed_list
failed_list=""
for i in \
srm smac-multihop hier-routing algo-routing mcast vc session mixmode \
simultaneous webcache mcache plm wireless-tdma
do
date
try ./test-all-$i
date
sleep 2
done
echo "These messages are NOT errors and can be ignored:"
echo " warning: using backward compatibility mode"
echo " This test is not implemented in backward compatibility mode"
echo
if $any_portable_failed
then
echo
echo "validate overall report: some portable tests failed:"
echo " $portable_failed_list"
if $any_failed
then
echo "some non-portable tests also failed:"
echo " $failed_list"
fi
echo "to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME"
exit 1
fi
if $any_failed
then
echo
echo "validate overall report: all portable tests passed but"
echo "some non-portable tests failed:"
echo " $failed_list"
echo "to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME"
echo ""
echo "Note that the non-portable test list includes files that"
echo "are known to pass on Linux x86 machines but that are known"
echo "to have some portability problems to other platforms or"
echo "operating systems. Failure of one of these tests does not"
echo "necessarily mean that one will encounter a problem in your"
echo "simulations, but that one must be careful of using that"
echo "specific model on the system on which the validate was run."
if [ "${test_cygwin}" = "true" ]; then
cmaj=` uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/\1/'`;
echo $cmaj | grep -v [0-9] >/dev/null 2>&1
if [ "$?" -eq "0" ]; then
cmaj=0;
fi;
cmin=` uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/\2/'`;
echo $cmin | grep -v [0-9] >/dev/null 2>&1
if [ "$?" -eq "0" ]; then
cmin=0;
fi;
cpat=` uname -r | sed -e 's/^\([0-9]*\)\.\([0-9]*\).\([0-9]*\).*/\3/'`;
echo $cpat | grep -v [0-9] >/dev/null 2>&1
if [ "$?" -eq "0" ]; then
cpat=0;
fi;
if ([ "$cmaj" -gt "1" ]) || ([ "$cmaj" -eq "1" ] && [ $cmin -gt "3" ]) || ([ "$cmaj" -eq 1 ] && [ $cmin -eq "3" ] && [ "$cpat" -ge "19" ]); then
echo "";
echo "Cygwin >= 1.3.19 detected ($cmaj.$cmin.$cpat), all tests should have passed.";
echo "Please see <http://www.isi.edu/nsnam/ns/ns-problems.html>";
echo "for potential solutions.";
else
echo "";
echo "Cygwin < 1.3.19 detected. ($cmaj.$cmin.$cpat)";
echo "";
echo "Some tests are EXPECTED to break. Please see"
echo "<http://www.isi.edu/nsnam/ns/ns-problems.html> for a list.";
echo "";
echo "You may want to upgrade to a more recent version of Cygwin.";
fi;
fi;
exit 0
else
echo ""
echo "validate overall report: all tests passed"
exit 0
fi
|