summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-06-24 14:57:43 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-06-24 14:59:34 +1000
commit005c57cfb4b3fd9c0691d0b36cd026a432a0816a (patch)
treed020800835dde5d5ac1f26507825c41085b64e82
parent707ed29d22cd973f07633a0ed82de10075d50edb (diff)
Improve pt script to allow for single test-cases to be run.
This patch adds two changes: Instead of defaulting to a ./Test binary (these aren't built anymore), take the non-parameter argument as program name. If multiple are specified, the last one will be picked - don't do that. export TET_RESFILE as <programname>.log by default unless it's already set in the environment. Example use case now: $> pt XGrabButton will generate XGrabButton.log Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rwxr-xr-xxts5/src/bin/scripts/pt21
1 files changed, 14 insertions, 7 deletions
diff --git a/xts5/src/bin/scripts/pt b/xts5/src/bin/scripts/pt
index 0e0f8db3..05f59a62 100755
--- a/xts5/src/bin/scripts/pt
+++ b/xts5/src/bin/scripts/pt
@@ -19,13 +19,6 @@
trap "rm -f CONFIG" 0
-PROG=./Test
-if [ ! -f $PROG ]; then
- # If there isn't a ./Test then try for the space saving name.
- THISDIR=`pwd`
- PROG=./`basename $THISDIR`
-fi
-
ICS=
echo > CONFIG
@@ -66,10 +59,19 @@ do
-m)
PROG=./MTest
;;
+ *)
+ PROG=$1
+ ;;
esac
shift
done
+if [ ! -f "$PROG" ]; then
+ echo "Cannot find test run '$PROG'";
+ exit 1
+fi
+
+
# config=${TET_CONFIG:-$TET_ROOT/xts5/tetexec.cfg}
# Since :- is not universal, and I really want that functionality.
if [ x"$TET_CONFIG" = x"" ]; then
@@ -78,6 +80,11 @@ else
config=$TET_CONFIG
fi
+if [ -z "$TEST_RESFILE" ]; then
+ TET_RESFILE=$PROG.log
+ export TET_RESFILE
+fi
+
cat $config >> CONFIG
echo "junk=junk" >> CONFIG # TEMP