Mercurial > hg > toybox
comparison scripts/test.sh @ 275:005af6006ce3
Update help, move test.sh to scripts, and fix "make test" to call right script.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 28 Mar 2008 00:44:44 -0500 |
parents | test.sh@c7645fab8d73 |
children | 977302071875 |
comparison
equal
deleted
inserted
replaced
274:5b948171e495 | 275:005af6006ce3 |
---|---|
1 #!/bin/bash | |
2 | |
3 [ -z "$TOPDIR" ] && TOPDIR="$(pwd)" | |
4 | |
5 rm -rf testdir | |
6 mkdir -p testdir | |
7 | |
8 if [ -z "$OLD" ] | |
9 then | |
10 make install_flat PREFIX=testdir | |
11 fi | |
12 | |
13 cd testdir | |
14 PATH=.:$PATH | |
15 | |
16 . "$TOPDIR"/scripts/test/testing.sh | |
17 [ -f "$TOPDIR/gen_config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/gen_config.h") | sed 's/ /:/g') | |
18 | |
19 if [ $# -ne 0 ] | |
20 then | |
21 for i in "$@" | |
22 do | |
23 . "$TOPDIR"/scripts/test/$i.test | |
24 done | |
25 else | |
26 for i in "$TOPDIR"/scripts/test/*.test | |
27 do | |
28 . $i | |
29 done | |
30 fi |