summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xapts6
-rw-r--r--tests/generic-apk2
2 files changed, 6 insertions, 2 deletions
diff --git a/apts b/apts
index 56294f8..247dfd7 100755
--- a/apts
+++ b/apts
@@ -6,6 +6,7 @@
# Author: Jeff Bilyk <jbilyk@gmail.com>
# Version History:
# Dec 4 2010 - Initial version
+# Dec 11 2010 - Added generic-apk test for cases where there isn't a package test file
# Get file to output to
program=$0
@@ -51,10 +52,11 @@ while [ $# -gt 0 ]; do
PACKAGE=$1
# does testing file exist
test -e ./tests/$PACKAGE
+ # If no testing file exists then run generic-apk
if [ "$?" == "1" ];
- then echo "Testing file for $PACKAGE does not exist";
+ then echo "Testing file for $PACKAGE does not exist" && /bin/sh -e ./tests/generic-apk >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;
# if testing file exists, then keep running
- else echo "Testing $PACKAGE apk" && /bin/sh -e ./tests/$PACKAGE >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;i
+ else echo "Testing $PACKAGE apk" && /bin/sh -e ./tests/$PACKAGE >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;
fi
i=$(( $i + 1 ))
shift
diff --git a/tests/generic-apk b/tests/generic-apk
new file mode 100644
index 0000000..e14d631
--- /dev/null
+++ b/tests/generic-apk
@@ -0,0 +1,2 @@
+ apk_add $@
+ apk_del $@