diff options
-rwxr-xr-x | apts | 6 | ||||
-rw-r--r-- | tests/generic-apk | 2 |
2 files changed, 6 insertions, 2 deletions
@@ -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 $@ |