diff options
author | Rob Landley <rob@landley.net> | 2016-03-02 15:20:04 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-03-02 15:20:04 -0600 |
commit | 336c44adca1768ada1e1e2f4d7dbbc33e994e582 (patch) | |
tree | 9780ee9602ffbca6b04e472d3ac0d158f92ac49c /scripts | |
parent | eb830728b12152702c3852d079ad5c8a7f6e709b (diff) | |
download | toybox-336c44adca1768ada1e1e2f4d7dbbc33e994e582.tar.gz |
Factor out command name at the start of test name, have runtest.sh print it.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/runtest.sh | 2 | ||||
-rwxr-xr-x | scripts/test.sh | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 884af9c5..0c933c2c 100644 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -64,7 +64,7 @@ optional() testing() { - NAME="$1" + NAME="$CMDNAME $1" [ -z "$1" ] && NAME=$2 if [ $# -ne 5 ] diff --git a/scripts/test.sh b/scripts/test.sh index 2276619e..0c3d7aaf 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -29,12 +29,15 @@ if [ $# -ne 0 ] then for i in "$@" do + CMDNAME="${i##*/}" + CMDNAME="${CMDNAME%.test}" . "$TOPDIR"/tests/$i.test done else for i in "$TOPDIR"/tests/*.test do - CMDNAME="$(echo "$i" | sed 's@.*/\(.*\)\.test@\1@')" + CMDNAME="${i##*/}" + CMDNAME="${CMDNAME%.test}" if [ -h ../$CMDNAME ] || [ ! -z "$TEST_HOST" ] then cd .. && rm -rf testdir && mkdir testdir && cd testdir || exit 1 |