From 9d243a2efc889f9a171c8af1fc750665c4fb4e1b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 28 Mar 2008 00:44:44 -0500 Subject: Update help, move test.sh to scripts, and fix "make test" to call right script. --- Makefile | 5 ++++- scripts/test.sh | 30 ++++++++++++++++++++++++++++++ test.sh | 30 ------------------------------ 3 files changed, 34 insertions(+), 31 deletions(-) create mode 100755 scripts/test.sh delete mode 100755 test.sh diff --git a/Makefile b/Makefile index da40c255..1139ae4b 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ distclean: clean test: tests tests: - scripts/testall.sh + scripts/test.sh help:: @echo ' toybox - Build toybox.' @@ -59,3 +59,6 @@ help:: @echo ' clean - Delete temporary files.' @echo ' distclean - Delete everything that isn't shipped.' @echo ' install_flat - Install toybox into $PREFIX directory.' + @echo ' install - Install toybox into subdirectories of $PREFIX.' + @echo ' uninstall_flat - Remove toybox from $PREFIX directory." + @echo ' uninstall - Remove toybox from subdirectories of $PREFIX." diff --git a/scripts/test.sh b/scripts/test.sh new file mode 100755 index 00000000..1833682f --- /dev/null +++ b/scripts/test.sh @@ -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 diff --git a/test.sh b/test.sh deleted file mode 100755 index 1833682f..00000000 --- a/test.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/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 -- cgit v1.2.3