annotate test.sh @ 226:6aac63925eff

Update web pages.
author Rob Landley <rob@landley.net>
date Sat, 05 Jan 2008 18:09:49 -0600
parents a14921912ebc
children c7645fab8d73
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
204
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
2
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
3 [ -z "$TOPDIR" ] && TOPDIR="$(pwd)"
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
4
206
a14921912ebc Delete testdir after use.
Rob Landley <rob@landley.net>
parents: 204
diff changeset
5 rm -rf testdir
a14921912ebc Delete testdir after use.
Rob Landley <rob@landley.net>
parents: 204
diff changeset
6 mkdir -p testdir
204
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
7
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
8 if [ -z "$OLD" ]
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
9 then
206
a14921912ebc Delete testdir after use.
Rob Landley <rob@landley.net>
parents: 204
diff changeset
10 make install_flat PREFIX=testdir
204
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
11 fi
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
12
206
a14921912ebc Delete testdir after use.
Rob Landley <rob@landley.net>
parents: 204
diff changeset
13 cd testdir
204
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
14 PATH=.:$PATH
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
15
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
16 . "$TOPDIR"/scripts/test/testing.sh
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
17 [ -f "$TOPDIR/gen_config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/gen_config.h") | sed 's/ /:/g')
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
18
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
19 if [ $# -ne 0 ]
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
20 then
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
21 for i in "$@"
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
22 do
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
23 . "$TOPDIR"/scripts/test/$i.test
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
24 done
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
25 else
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
26 for i in "$TOPDIR"/scripts/test/*.test
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
27 do
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
28 . $i
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
29 done
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
30 fi
64b6941c2f51 Add a wrapper to run tests out of scripts/test. With no arguments, runs all
Rob Landley <rob@landley.net>
parents:
diff changeset
31
206
a14921912ebc Delete testdir after use.
Rob Landley <rob@landley.net>
parents: 204
diff changeset
32 cd ..
a14921912ebc Delete testdir after use.
Rob Landley <rob@landley.net>
parents: 204
diff changeset
33 rm -rf testdir