Mercurial > hg > toybox
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/test.sh Fri Mar 28 00:44:44 2008 -0500 @@ -0,0 +1,30 @@ +#!/bin/bash + +[ -z "$TOPDIR" ] && TOPDIR="$(pwd)" + +rm -rf testdir +mkdir -p testdir + +if [ -z "$OLD" ] +then + make install_flat PREFIX=testdir +fi + +cd testdir +PATH=.:$PATH + +. "$TOPDIR"/scripts/test/testing.sh +[ -f "$TOPDIR/gen_config.h" ] && export OPTIONFLAGS=:$(echo $(sed -nr 's/^#define CFG_(.*) 1/\1/p' "$TOPDIR/gen_config.h") | sed 's/ /:/g') + +if [ $# -ne 0 ] +then + for i in "$@" + do + . "$TOPDIR"/scripts/test/$i.test + done +else + for i in "$TOPDIR"/scripts/test/*.test + do + . $i + done +fi