# HG changeset patch # User Rob Landley # Date 1206683084 18000 # Node ID 005af6006ce3226e1e14e0572cb7b4333a6f0675 # Parent 5b948171e495a4fb4c2ee8e4267c705b51dd73d0 Update help, move test.sh to scripts, and fix "make test" to call right script. diff -r 5b948171e495 -r 005af6006ce3 Makefile --- a/Makefile Fri Mar 28 00:40:57 2008 -0500 +++ b/Makefile Fri Mar 28 00:44:44 2008 -0500 @@ -49,7 +49,7 @@ test: tests tests: - scripts/testall.sh + scripts/test.sh help:: @echo ' toybox - Build toybox.' @@ -59,3 +59,6 @@ @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 -r 5b948171e495 -r 005af6006ce3 scripts/test.sh --- /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 diff -r 5b948171e495 -r 005af6006ce3 test.sh --- a/test.sh Fri Mar 28 00:40:57 2008 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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