| 1 | #! /bin/sh
|
|---|
| 2 |
|
|---|
| 3 | isok=`test -t 1 2>&1 | wc -c`
|
|---|
| 4 | if [ "$isok" -eq 0 ]; then
|
|---|
| 5 | test -t 1
|
|---|
| 6 | isok=$?
|
|---|
| 7 | fi
|
|---|
| 8 |
|
|---|
| 9 | # The following two are the ANSI sequences for start and end embolden
|
|---|
| 10 | if [ x"$isok" = x0 ]; then
|
|---|
| 11 | case $TERM in
|
|---|
| 12 | vt*|ansi*|con*|xterm*|linux*|screen*|rxvt*)
|
|---|
| 13 | S='[1;30m'
|
|---|
| 14 | R=[31m
|
|---|
| 15 | G=[32m
|
|---|
| 16 | B=[36m
|
|---|
| 17 | E=[m
|
|---|
| 18 | ;;
|
|---|
| 19 | *)
|
|---|
| 20 | S=
|
|---|
| 21 | R=
|
|---|
| 22 | G=
|
|---|
| 23 | B=
|
|---|
| 24 | E=
|
|---|
| 25 | ;;
|
|---|
| 26 | esac
|
|---|
| 27 | fi
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | usage() {
|
|---|
| 31 | echo "test.sh [options] <test_number> [hostname]"
|
|---|
| 32 | echo " [-q|--quiet|-v|--verbose] [-s|--stoponerr] [--no-cleanup]"
|
|---|
| 33 | echo " [--srcdir=top_srcdir] [--color=always|never|auto]"
|
|---|
| 34 | echo
|
|---|
| 35 | echo " ${S}test.sh 1${E} -- Compile with many different options"
|
|---|
| 36 | echo " ${S}test.sh 2${E} -- Hash function (testrc_1)"
|
|---|
| 37 | echo " ${S}test.sh 3${E} -- Standalone init/check"
|
|---|
| 38 | echo " ${S}test.sh 4${E} -- Microstealth init/check"
|
|---|
| 39 | echo " ${S}test.sh 5${E} -- External program call (testrc_1ext.in)"
|
|---|
| 40 | echo " ${S}test.sh 6${E} -- Controlling the daemon"
|
|---|
| 41 | echo " ${S}test.sh 7${E} -- GnuPG signed files / prelude log"
|
|---|
| 42 | echo " ${S}test.sh 8${E} -- Suidcheck"
|
|---|
| 43 |
|
|---|
| 44 | echo " ${S}test.sh 10${E} -- Test c/s init/check (testrc_2.in)"
|
|---|
| 45 | echo " ${S}test.sh 11${E} -- Test full c/s init/check (testrc_2.in)"
|
|---|
| 46 | echo " ${S}test.sh 12${E} -- Test full c/s w/gpg (testrc_2.in)"
|
|---|
| 47 | echo " ${S}test.sh 13${E} -- Test full c/s w/mysql (testrc_2.in)"
|
|---|
| 48 | echo " ${S}test.sh 14${E} -- Test full c/s w/postgres (testrc_2.in)"
|
|---|
| 49 | echo " ${S}test.sh all${E} -- All tests"
|
|---|
| 50 | }
|
|---|
| 51 | scripts () {
|
|---|
| 52 | echo
|
|---|
| 53 | echo "Scripts used by tests:"
|
|---|
| 54 | echo " (1) testcompile.sh (2) testhash.sh (3) testrun_1.sh (4) testrun_1a.sh"
|
|---|
| 55 | echo " (5) testext.sh (6) testtimesrv.sh (7) testrun_1b.sh (8) testrun_1c.sh"
|
|---|
| 56 | echo " (10) testrun_2.sh (11) testrun_2a.sh (12) testrun_2b.sh (13) testrun_2c.sh"
|
|---|
| 57 | echo " (14) testrun_2d.sh"
|
|---|
| 58 | }
|
|---|
| 59 |
|
|---|
| 60 | #
|
|---|
| 61 | # Option parsing
|
|---|
| 62 | #
|
|---|
| 63 | verbose=
|
|---|
| 64 | quiet=
|
|---|
| 65 | stoponerr=
|
|---|
| 66 | color=auto
|
|---|
| 67 | cleanup=on
|
|---|
| 68 | doall=
|
|---|
| 69 | usevalgrind=
|
|---|
| 70 |
|
|---|
| 71 | while [ $# -gt 0 ]
|
|---|
| 72 | do
|
|---|
| 73 | case "$1" in
|
|---|
| 74 | -h|--help) usage; exit 0;;
|
|---|
| 75 | --scripts) usage; scripts; exit 0;;
|
|---|
| 76 | -v|--verbose) verbose=on; quiet= ;;
|
|---|
| 77 | -q|--quiet) quiet=on; verbose= ;;
|
|---|
| 78 | -s|--stoponerr) stoponerr=on;;
|
|---|
| 79 | --no-cleanup) cleanup= ;;
|
|---|
| 80 | --really-all) doall=on;;
|
|---|
| 81 | --valgrind) usevalgrind=on;;
|
|---|
| 82 | --srcdir=*) TOP_SRCDIR=`echo $1 | sed s,--srcdir=,,`; export TOP_SRCDIR;;
|
|---|
| 83 | --color=*)
|
|---|
| 84 | arg=`echo $1 | sed s,--color=,,`
|
|---|
| 85 | case $arg in
|
|---|
| 86 | auto) ;;
|
|---|
| 87 | never|none|no)
|
|---|
| 88 | S=
|
|---|
| 89 | R=
|
|---|
| 90 | G=
|
|---|
| 91 | B=
|
|---|
| 92 | E=
|
|---|
| 93 | ;;
|
|---|
| 94 | always|yes)
|
|---|
| 95 | S='[1;30m'
|
|---|
| 96 | R=[31m
|
|---|
| 97 | G=[32m
|
|---|
| 98 | G=[36m
|
|---|
| 99 | E=[m
|
|---|
| 100 | ;;
|
|---|
| 101 | *) echo "Invalid argument $1"; exit 1;;
|
|---|
| 102 | esac
|
|---|
| 103 | ;;
|
|---|
| 104 | -*) echo "Invalid argument $1"; exit 1;;
|
|---|
| 105 | *) break;;
|
|---|
| 106 | esac
|
|---|
| 107 | shift
|
|---|
| 108 | done
|
|---|
| 109 |
|
|---|
| 110 | export verbose
|
|---|
| 111 | export quiet
|
|---|
| 112 | export stoponerr
|
|---|
| 113 | export cleanup
|
|---|
| 114 | export doall
|
|---|
| 115 | export S; export R; export G; export B; export E;
|
|---|
| 116 |
|
|---|
| 117 | SCRIPTDIR=.
|
|---|
| 118 |
|
|---|
| 119 | #
|
|---|
| 120 | # 'make test' will copy the 'test' subdirectory and replace TEST_SRCDIR
|
|---|
| 121 | #
|
|---|
| 122 | TEST_SRCDIR="XXXSRCXXX";
|
|---|
| 123 | if test "x${TOP_SRCDIR}" = x; then
|
|---|
| 124 | # not within source tree, and not called with 'make testN'
|
|---|
| 125 | if test -f "${TEST_SRCDIR}/src/samhain.c"; then
|
|---|
| 126 | TOP_SRCDIR="${TEST_SRCDIR}"; export TOP_SRCDIR
|
|---|
| 127 | if test -f test/testcompile.sh; then
|
|---|
| 128 | SCRIPTDIR=test
|
|---|
| 129 | fi
|
|---|
| 130 | # not within source tree, not called by 'make', and in 'test' subdir
|
|---|
| 131 | elif test -f "../${TEST_SRCDIR}/src/samhain.c"; then
|
|---|
| 132 | cd ..
|
|---|
| 133 | SCRIPTDIR=test
|
|---|
| 134 | TOP_SRCDIR="${TEST_SRCDIR}"; export TOP_SRCDIR
|
|---|
| 135 | # within source tree, and not called with 'make testN'
|
|---|
| 136 | else
|
|---|
| 137 | if test -f ../src/samhain.c; then
|
|---|
| 138 | cd ..
|
|---|
| 139 | SCRIPTDIR=test
|
|---|
| 140 | TOP_SRCDIR=.
|
|---|
| 141 | export TOP_SRCDIR
|
|---|
| 142 | elif test -f ./src/samhain.c; then
|
|---|
| 143 | SCRIPTDIR=test
|
|---|
| 144 | TOP_SRCDIR=.
|
|---|
| 145 | export TOP_SRCDIR
|
|---|
| 146 | else
|
|---|
| 147 | echo "Please use --srcdir=DIR, where DIR should be the"
|
|---|
| 148 | echo "top directory in the samhain source tree."
|
|---|
| 149 | exit 1
|
|---|
| 150 | fi
|
|---|
| 151 | fi
|
|---|
| 152 | else
|
|---|
| 153 | # called by make, or with --srcdir=TOP_SRCDIR
|
|---|
| 154 | if test -f "${TOP_SRCDIR}/src/samhain.c"; then
|
|---|
| 155 | SCRIPTDIR="${TOP_SRCDIR}/test"
|
|---|
| 156 | elif test -f "../${TOP_SRCDIR}/src/samhain.c"; then
|
|---|
| 157 | cd ..; SCRIPTDIR="${TOP_SRCDIR}/test"
|
|---|
| 158 | else
|
|---|
| 159 | echo "Please use --srcdir=DIR, where DIR should be the"
|
|---|
| 160 | echo "top directory in the samhain source tree."
|
|---|
| 161 | exit 1
|
|---|
| 162 | fi
|
|---|
| 163 | fi
|
|---|
| 164 |
|
|---|
| 165 | export SCRIPTDIR
|
|---|
| 166 |
|
|---|
| 167 | PW_DIR=`pwd`; export PW_DIR
|
|---|
| 168 | #
|
|---|
| 169 | #
|
|---|
| 170 | #
|
|---|
| 171 | if test x$UID != x; then
|
|---|
| 172 | TRUST="--with-trusted=0,2,$UID"
|
|---|
| 173 | else
|
|---|
| 174 | TRUST="--with-trusted=0,2,500"
|
|---|
| 175 | fi
|
|---|
| 176 | export TRUST
|
|---|
| 177 | #
|
|---|
| 178 | # find a good 'make'
|
|---|
| 179 | #
|
|---|
| 180 | MAKE=`which gmake`
|
|---|
| 181 | if test "x$?" = x1 ; then
|
|---|
| 182 | MAKE="make -s"
|
|---|
| 183 | else
|
|---|
| 184 | MAKE=`which gmake | sed -e "s%\([a-z:]\) .*%\1%g"`
|
|---|
| 185 | if test "x$MAKE" = x; then
|
|---|
| 186 | MAKE="make -s"
|
|---|
| 187 | elif test "x$MAKE" = xno; then
|
|---|
| 188 | MAKE="make -s"
|
|---|
| 189 | else
|
|---|
| 190 | if test "x$MAKE" = "xwhich:"; then
|
|---|
| 191 | MAKE="make -s"
|
|---|
| 192 | else
|
|---|
| 193 | MAKE="gmake -s"
|
|---|
| 194 | gmake -v >/dev/null 2>&1 || MAKE="make -s"
|
|---|
| 195 | fi
|
|---|
| 196 | fi
|
|---|
| 197 | fi
|
|---|
| 198 | export MAKE
|
|---|
| 199 |
|
|---|
| 200 | failcount=0
|
|---|
| 201 | okcount=0
|
|---|
| 202 | skipcount=0
|
|---|
| 203 | global_count=0
|
|---|
| 204 | last_count=0
|
|---|
| 205 |
|
|---|
| 206 | # args: #test, #total, status, optional msg
|
|---|
| 207 | log_msg ()
|
|---|
| 208 | {
|
|---|
| 209 | if [ x"$COLUMNS" != x ]; then
|
|---|
| 210 | TERMWIDTH=$COLUMNS
|
|---|
| 211 | elif [ x"$COLS" != x ]; then
|
|---|
| 212 | TERMWIDTH=$COLS
|
|---|
| 213 | else
|
|---|
| 214 | TERMWIDTH=80
|
|---|
| 215 | fi
|
|---|
| 216 | cols=66;
|
|---|
| 217 | #
|
|---|
| 218 | if [ $1 -eq 0 ]; then
|
|---|
| 219 | msg=" ${4}"
|
|---|
| 220 | else
|
|---|
| 221 | if [ ${1} -eq 1 ]; then
|
|---|
| 222 | global_count=${last_count}
|
|---|
| 223 | fi
|
|---|
| 224 | let "v = $1 + global_count" >/dev/null
|
|---|
| 225 | last_count=${v}
|
|---|
| 226 | dd=''; if [ $v -lt 10 ]; then dd=" "; fi
|
|---|
| 227 | dt=''; if [ $2 -lt 10 ]; then dt=" "; fi
|
|---|
| 228 | if [ -z "$4" ]; then
|
|---|
| 229 | msg=" test ${dd}${v}/${dt}${2}"
|
|---|
| 230 | else
|
|---|
| 231 | msg=" test ${dd}${v}/${dt}${2} ${4}"
|
|---|
| 232 | fi
|
|---|
| 233 | fi
|
|---|
| 234 | #
|
|---|
| 235 | if [ x"$3" = xfailure ]; then
|
|---|
| 236 | ccode=$R
|
|---|
| 237 | elif [ x"$3" = xsuccess ]; then
|
|---|
| 238 | ccode=$G
|
|---|
| 239 | else
|
|---|
| 240 | ccode=$B
|
|---|
| 241 | fi
|
|---|
| 242 | if [ -z "${R}" ]; then
|
|---|
| 243 | echo " [${3}] ${msg}"
|
|---|
| 244 | else
|
|---|
| 245 | # len=${#...} is not bourne shell
|
|---|
| 246 | # also, need to account for terminal control sequences
|
|---|
| 247 | len=`echo "$msg" | awk '/1;30m/ { print length()-10; }; !/1;30m/ { print length();}'`
|
|---|
| 248 | let "cols = cols - len" >/dev/null
|
|---|
| 249 | moveto='['$cols'C'
|
|---|
| 250 | echo "${msg}${moveto}${ccode}[${3}]${E}"
|
|---|
| 251 | fi
|
|---|
| 252 | }
|
|---|
| 253 |
|
|---|
| 254 | log_fail () {
|
|---|
| 255 | log_msg "$1" "$2" failure "$3";
|
|---|
| 256 | let "failcount = failcount + 1" >/dev/null;
|
|---|
| 257 | test -z "$stoponerr" || exit 1;
|
|---|
| 258 | }
|
|---|
| 259 | log_ok () {
|
|---|
| 260 | log_msg "$1" "$2" success "$3";
|
|---|
| 261 | let "okcount = okcount + 1" >/dev/null;
|
|---|
| 262 | }
|
|---|
| 263 | log_skip () {
|
|---|
| 264 | log_msg "$1" "$2" skipped "$3";
|
|---|
| 265 | let "skipcount = skipcount + 1" >/dev/null;
|
|---|
| 266 | }
|
|---|
| 267 |
|
|---|
| 268 | log_msg_fail () { log_msg 0 0 failure "$1"; }
|
|---|
| 269 | log_msg_ok () { log_msg 0 0 success "$1"; }
|
|---|
| 270 | log_msg_skip () { log_msg 0 0 skipped "$1"; }
|
|---|
| 271 |
|
|---|
| 272 | log_start () {
|
|---|
| 273 | if [ -z "$quiet" ]; then
|
|---|
| 274 | echo;
|
|---|
| 275 | echo "${S}__ START TEST ${1} __${E}";
|
|---|
| 276 | echo;
|
|---|
| 277 | fi
|
|---|
| 278 | }
|
|---|
| 279 | log_end () {
|
|---|
| 280 | if [ -n "$verbose" ]; then
|
|---|
| 281 | echo;
|
|---|
| 282 | echo "${S}__ END TEST ${1} __${E}";
|
|---|
| 283 | echo;
|
|---|
| 284 | fi
|
|---|
| 285 | }
|
|---|
| 286 |
|
|---|
| 287 | do_cleanup () {
|
|---|
| 288 | rm -f testrc_1.dyn
|
|---|
| 289 | rm -f testrc_2
|
|---|
| 290 | rm -f ./.samhain_file
|
|---|
| 291 | rm -f ./.samhain_log*
|
|---|
| 292 | rm -f ./.samhain_lock
|
|---|
| 293 | test -d testrun_testdata && chmod -R 0700 testrun_testdata
|
|---|
| 294 | test -d .quarantine && rm -rf .quarantine
|
|---|
| 295 | rm -rf testrun_testdata
|
|---|
| 296 | rm -f test_log_db
|
|---|
| 297 | rm -f test_log_prelude
|
|---|
| 298 | rm -f test_log_valgrind
|
|---|
| 299 | rm -f test_log_yulectl
|
|---|
| 300 | rm -f yule.html
|
|---|
| 301 | }
|
|---|
| 302 |
|
|---|
| 303 | print_summary ()
|
|---|
| 304 | {
|
|---|
| 305 | let "gcount = okcount + skipcount + failcount" >/dev/null;
|
|---|
| 306 | [ -z "$quiet" ] && {
|
|---|
| 307 | echo
|
|---|
| 308 | echo "__ ${S}Tests: ${gcount} Ok: ${okcount} Skipped: ${skipcount} Failed: ${failcount}${E}"
|
|---|
| 309 | }
|
|---|
| 310 | if [ $failcount -eq 0 ]; then
|
|---|
| 311 | [ -z "$quiet" ] && { echo "__ ${G}All tests passed successfully.${E}"; echo; }
|
|---|
| 312 | elif [ $failcount -eq 1 ]; then
|
|---|
| 313 | [ -z "$quiet" ] && { echo "__ ${R}There was 1 failure.${E}"; echo; }
|
|---|
| 314 | else
|
|---|
| 315 | [ -z "$quiet" ] && { echo "__ ${R}There were $failcount failures.${E}"; echo; }
|
|---|
| 316 | fi
|
|---|
| 317 | [ -z "$cleanup" ] || do_cleanup;
|
|---|
| 318 | }
|
|---|
| 319 |
|
|---|
| 320 | find_path () { (
|
|---|
| 321 | save_IFS=$IFS; IFS=:
|
|---|
| 322 |
|
|---|
| 323 | for dir in $PATH; do
|
|---|
| 324 | IFS=$as_save_IFS
|
|---|
| 325 | test -z "$dir" && dir=.
|
|---|
| 326 | if test -f "$dir/$1"; then
|
|---|
| 327 | echo "$dir/$1";
|
|---|
| 328 | break;
|
|---|
| 329 | fi
|
|---|
| 330 | done
|
|---|
| 331 | IFS=${save_IFS};
|
|---|
| 332 | ); }
|
|---|
| 333 |
|
|---|
| 334 | find_hostname () {
|
|---|
| 335 | tmp=`hostname -f 2>/dev/null`
|
|---|
| 336 | if [ $? -ne 0 ]; then
|
|---|
| 337 | tmp=`hostname 2>/dev/null`
|
|---|
| 338 | fi
|
|---|
| 339 | if [ -z "$tmp" ]; then
|
|---|
| 340 | tmp="localhost"
|
|---|
| 341 | fi
|
|---|
| 342 | echo "$tmp"
|
|---|
| 343 | }
|
|---|
| 344 |
|
|---|
| 345 | rm -f ./test_log
|
|---|
| 346 |
|
|---|
| 347 | # first one is hostname, others are aliases
|
|---|
| 348 | #
|
|---|
| 349 | hostname=`cat /etc/hosts | egrep "^ *127.0.0.1" | awk '{ print $2 }'`
|
|---|
| 350 | if [ x"$hostname" = xlocalhost ]; then
|
|---|
| 351 | hostname="127.0.0.1"
|
|---|
| 352 | fi
|
|---|
| 353 |
|
|---|
| 354 | # Seems that 'valgrind' causes random hangs :-(
|
|---|
| 355 | #
|
|---|
| 356 | if [ -z "$usevalgrind" ]; then
|
|---|
| 357 | VALGRIND=
|
|---|
| 358 | else
|
|---|
| 359 | VALGRIND=`find_path valgrind`;
|
|---|
| 360 | fi
|
|---|
| 361 | [ -z "$VALGRIND" ] || {
|
|---|
| 362 | VALGRIND="$VALGRIND --quiet --tool=memcheck --suppressions=.test.supp";
|
|---|
| 363 | export VALGRIND;
|
|---|
| 364 | [ -z "$verbose" ] || log_msg_ok "using valgrind"
|
|---|
| 365 | cat > ".test.supp" <<End-of-data
|
|---|
| 366 | #
|
|---|
| 367 | # there are unitialized bytes in the struct...
|
|---|
| 368 | #
|
|---|
| 369 | {
|
|---|
| 370 | pushdata_01
|
|---|
| 371 | Memcheck:Param
|
|---|
| 372 | write(buf)
|
|---|
| 373 | obj:/lib/ld-*.so
|
|---|
| 374 | fun:sh_hash_pushdata
|
|---|
| 375 | fun:sh_files_filecheck
|
|---|
| 376 | fun:sh_dirs_chk
|
|---|
| 377 | }
|
|---|
| 378 | {
|
|---|
| 379 | pushdata_02
|
|---|
| 380 | Memcheck:Param
|
|---|
| 381 | write(buf)
|
|---|
| 382 | obj:/lib/ld-*.so
|
|---|
| 383 | fun:sh_hash_pushdata
|
|---|
| 384 | fun:sh_files_filecheck
|
|---|
| 385 | fun:sh_files_checkdir
|
|---|
| 386 | }
|
|---|
| 387 | {
|
|---|
| 388 | pushdata_03
|
|---|
| 389 | Memcheck:Param
|
|---|
| 390 | write(buf)
|
|---|
| 391 | obj:/lib/ld-*.so
|
|---|
| 392 | fun:sh_hash_pushdata
|
|---|
| 393 | fun:sh_hash_writeout
|
|---|
| 394 | fun:main
|
|---|
| 395 | }
|
|---|
| 396 |
|
|---|
| 397 | End-of-data
|
|---|
| 398 | }
|
|---|
| 399 |
|
|---|
| 400 | if test x$1 = x1; then
|
|---|
| 401 | . ${SCRIPTDIR}/testcompile.sh
|
|---|
| 402 | testcompile
|
|---|
| 403 | print_summary
|
|---|
| 404 | exit $?
|
|---|
| 405 | fi
|
|---|
| 406 | if test x$1 = x2; then
|
|---|
| 407 | . ${SCRIPTDIR}/testhash.sh
|
|---|
| 408 | testhash
|
|---|
| 409 | print_summary
|
|---|
| 410 | exit $?
|
|---|
| 411 | fi
|
|---|
| 412 | if test x$1 = x3; then
|
|---|
| 413 | . ${SCRIPTDIR}/testrun_1.sh
|
|---|
| 414 | testrun1
|
|---|
| 415 | print_summary
|
|---|
| 416 | exit $?
|
|---|
| 417 | fi
|
|---|
| 418 | if test x$1 = x4; then
|
|---|
| 419 | . ${SCRIPTDIR}/testrun_1.sh
|
|---|
| 420 | . ${SCRIPTDIR}/testrun_1a.sh
|
|---|
| 421 | testrun1a
|
|---|
| 422 | print_summary
|
|---|
| 423 | exit $?
|
|---|
| 424 | fi
|
|---|
| 425 | if test x$1 = x5; then
|
|---|
| 426 | . ${SCRIPTDIR}/testext.sh
|
|---|
| 427 | testext0
|
|---|
| 428 | print_summary
|
|---|
| 429 | exit $?
|
|---|
| 430 | fi
|
|---|
| 431 | if test x$1 = x6; then
|
|---|
| 432 | . ${SCRIPTDIR}/testtimesrv.sh
|
|---|
| 433 | testtime0
|
|---|
| 434 | print_summary
|
|---|
| 435 | exit $?
|
|---|
| 436 | fi
|
|---|
| 437 | if test x$1 = x7; then
|
|---|
| 438 | . ${SCRIPTDIR}/testrun_1b.sh
|
|---|
| 439 | testrun1b
|
|---|
| 440 | print_summary
|
|---|
| 441 | exit $?
|
|---|
| 442 | fi
|
|---|
| 443 | if test x$1 = x8; then
|
|---|
| 444 | . ${SCRIPTDIR}/testrun_1.sh
|
|---|
| 445 | . ${SCRIPTDIR}/testrun_1c.sh
|
|---|
| 446 | testrun1c
|
|---|
| 447 | print_summary
|
|---|
| 448 | exit $?
|
|---|
| 449 | fi
|
|---|
| 450 | if test x$1 = x10; then
|
|---|
| 451 | . ${SCRIPTDIR}/testrun_2.sh
|
|---|
| 452 | testrun2 $hostname
|
|---|
| 453 | print_summary
|
|---|
| 454 | exit $?
|
|---|
| 455 | fi
|
|---|
| 456 | if test x$1 = x11; then
|
|---|
| 457 | . ${SCRIPTDIR}/testrun_2a.sh
|
|---|
| 458 | testrun2a $hostname
|
|---|
| 459 | print_summary
|
|---|
| 460 | exit $?
|
|---|
| 461 | fi
|
|---|
| 462 | if test x$1 = x12; then
|
|---|
| 463 | . ${SCRIPTDIR}/testrun_2a.sh
|
|---|
| 464 | . ${SCRIPTDIR}/testrun_2b.sh
|
|---|
| 465 | testrun2b $hostname
|
|---|
| 466 | print_summary
|
|---|
| 467 | exit $?
|
|---|
| 468 | fi
|
|---|
| 469 | if test x$1 = x13; then
|
|---|
| 470 | . ${SCRIPTDIR}/testrun_2a.sh
|
|---|
| 471 | . ${SCRIPTDIR}/testrun_2c.sh
|
|---|
| 472 | testrun2c $hostname
|
|---|
| 473 | print_summary
|
|---|
| 474 | exit $?
|
|---|
| 475 | fi
|
|---|
| 476 | if test x$1 = x14; then
|
|---|
| 477 | . ${SCRIPTDIR}/testrun_2a.sh
|
|---|
| 478 | . ${SCRIPTDIR}/testrun_2d.sh
|
|---|
| 479 | testrun2d $hostname
|
|---|
| 480 | print_summary
|
|---|
| 481 | exit $?
|
|---|
| 482 | fi
|
|---|
| 483 | if test x$1 = xall; then
|
|---|
| 484 | TEST_MAX=0
|
|---|
| 485 | . ${SCRIPTDIR}/testcompile.sh
|
|---|
| 486 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 487 | . ${SCRIPTDIR}/testhash.sh
|
|---|
| 488 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 489 | . ${SCRIPTDIR}/testrun_1.sh
|
|---|
| 490 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 491 | . ${SCRIPTDIR}/testrun_1a.sh
|
|---|
| 492 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 493 | . ${SCRIPTDIR}/testext.sh
|
|---|
| 494 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 495 | . ${SCRIPTDIR}/testtimesrv.sh
|
|---|
| 496 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 497 | . ${SCRIPTDIR}/testrun_1b.sh
|
|---|
| 498 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 499 | . ${SCRIPTDIR}/testrun_1c.sh
|
|---|
| 500 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 501 | . ${SCRIPTDIR}/testrun_2.sh
|
|---|
| 502 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 503 | . ${SCRIPTDIR}/testrun_2a.sh
|
|---|
| 504 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 505 | . ${SCRIPTDIR}/testrun_2b.sh
|
|---|
| 506 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 507 | . ${SCRIPTDIR}/testrun_2c.sh
|
|---|
| 508 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 509 | . ${SCRIPTDIR}/testrun_2d.sh
|
|---|
| 510 | let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
|
|---|
| 511 | #
|
|---|
| 512 | # ${SCRIPTDIR}/testtimesrv.sh
|
|---|
| 513 | # ${SCRIPTDIR}/testrun_1b.sh
|
|---|
| 514 | # ${SCRIPTDIR}/testrun_2.sh $2
|
|---|
| 515 | # ${SCRIPTDIR}/testrun_2a.sh $2
|
|---|
| 516 | #
|
|---|
| 517 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 518 | testcompile
|
|---|
| 519 | testhash
|
|---|
| 520 | #
|
|---|
| 521 | . ${SCRIPTDIR}/testrun_1.sh
|
|---|
| 522 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 523 | testrun1
|
|---|
| 524 | #
|
|---|
| 525 | . ${SCRIPTDIR}/testrun_1a.sh
|
|---|
| 526 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 527 | testrun1a
|
|---|
| 528 | #
|
|---|
| 529 | testext0
|
|---|
| 530 | #
|
|---|
| 531 | . ${SCRIPTDIR}/testtimesrv.sh
|
|---|
| 532 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 533 | testtime0
|
|---|
| 534 | #
|
|---|
| 535 | . ${SCRIPTDIR}/testrun_1b.sh
|
|---|
| 536 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 537 | testrun1b
|
|---|
| 538 | #
|
|---|
| 539 | . ${SCRIPTDIR}/testrun_1.sh
|
|---|
| 540 | . ${SCRIPTDIR}/testrun_1c.sh
|
|---|
| 541 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 542 | testrun1c
|
|---|
| 543 | #
|
|---|
| 544 | . ${SCRIPTDIR}/testrun_2.sh
|
|---|
| 545 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 546 | testrun2 $hostname
|
|---|
| 547 | #
|
|---|
| 548 | . ${SCRIPTDIR}/testrun_2a.sh
|
|---|
| 549 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 550 | testrun2a $hostname
|
|---|
| 551 | #
|
|---|
| 552 | . ${SCRIPTDIR}/testrun_2b.sh
|
|---|
| 553 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 554 | testrun2b $hostname
|
|---|
| 555 | #
|
|---|
| 556 | . ${SCRIPTDIR}/testrun_2c.sh
|
|---|
| 557 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 558 | testrun2c $hostname
|
|---|
| 559 | #
|
|---|
| 560 | . ${SCRIPTDIR}/testrun_2d.sh
|
|---|
| 561 | MAXTEST=${TEST_MAX}; export MAXTEST
|
|---|
| 562 | testrun2d $hostname
|
|---|
| 563 | #
|
|---|
| 564 | print_summary
|
|---|
| 565 | exit 0
|
|---|
| 566 | fi
|
|---|
| 567 |
|
|---|
| 568 | usage;
|
|---|
| 569 |
|
|---|
| 570 | exit 1;
|
|---|
| 571 |
|
|---|
| 572 | __ARCHIVE_FOLLOWS__
|
|---|
| 573 | -tæCíMoÓ0Ç#@HøÄ
|
|---|
| 574 | »Å 4Ñ&m×I9€MõeëËÆ6U(MÝÖ[bwv²®ù|ïÀW$İç§ÝºŠMHlÈ?µµý÷ËóØqþõ÷ëû1;Ê¥
|
|---|
| 575 | Ò©TXjyuÒÖŠíiUM*Ìh©LBMiPéÕËI'JÀ}Aš0ÄÎ?g£ÍÌÊG!ÙŒUªÂek6JV5oÂJŸÑ0¬ü€m>X¢¡*õMÑÊsÇ |
|---|
| 576 | ¢î"\§$u¡Ee |
|---|
| 577 | úî"{cè0 |
|---|
| 578 | âÜî#ÀŠáû |
|---|
| 579 | wñ6èaéqä;BÏï"â7P8Ë·Áq%[Õ |
|---|
| 580 | QHZTª#»[#î8ªi¿ "ðšj1:€/:é(õ ešJ ê'5Þp]}d32§! õ±f¢×1éÑRµÅ¡LgMLTlì |
|---|
| 581 | ÷ù!Ïi1wOiAË |
|---|
| 582 | |
|---|
| 583 | Ü4ج`îŽi#1LDõÃŒr¶ØCºPC±qLIY,àêÚD,S: |
|---|
| 584 | J« ù
|
|---|
| 585 | ÀuMä¡År¹p |
|---|
| 586 | |
|---|
| 587 | xMáúdÑð Ö
|
|---|
| 588 | mpÆ-2úÑZE`G·dW%bóðUmÅË{Àæ])óde`íšÞØxüŽÕ
|
|---|
| 589 | ìK¹lòùú\¶³j®»:îÌuÞ=7°aäz+k[]gñ|Ü#<ëÄë |
|---|
| 590 | ³X±¶ë{ZE:ÞÊe§ æ«æYé]÷+xÄží
|
|---|
| 591 | õ= |
|---|
| 592 | ßÊKú |
|---|
| 593 | žÈÿjêØÿµt* |
|---|
| 594 | úFÓ€ÿ_Wãÿï?Ÿ}÷|1Š1ïÜæï»âçåIûÅí\XÞW£åiöO¡þ{ÊáÁÁ·ß÷wŠúöËá÷¯ûáGyý(?ÞŒúüíø|c_ìå/xÍøÀi ߨsÉra×Îhc'Ckt©±# |
|---|
| 595 | Œ9ÂMàá%Ô£úd®3l-ÑÂvŒ±¶±. |
|---|
| 596 | <7êÍKH$D"H$D"H$D"H$ |
|---|
| 597 | ø ?:v( |
|---|