diff options
author | Jeff Bilyk <jbilyk@gmail.com> | 2010-12-11 16:22:28 +0000 |
---|---|---|
committer | Jeff Bilyk <jbilyk@gmail.com> | 2010-12-11 16:22:28 +0000 |
commit | a56e0285359040b3024c373bb6f702556e1a6d60 (patch) | |
tree | 618590d794fe7a85c85631ed9d7c66a6eb551ad1 | |
parent | 65980989ecb6d7dfc026126e440c8565bf28d2d6 (diff) | |
download | apts-a56e0285359040b3024c373bb6f702556e1a6d60.tar.bz2 apts-a56e0285359040b3024c373bb6f702556e1a6d60.tar.xz |
apts: added generic-apk test for apks without a test file
Added generic-apk test file, which just apk_add's and apk_del's package for the cases where no test file exists
-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 $@ |