summaryrefslogtreecommitdiffstats
path: root/apts
diff options
context:
space:
mode:
Diffstat (limited to 'apts')
-rwxr-xr-xapts10
1 files changed, 5 insertions, 5 deletions
diff --git a/apts b/apts
index 247dfd7..e91ca10 100755
--- a/apts
+++ b/apts
@@ -40,9 +40,9 @@ shift
# if there aren't any args besides outfile test all packages
if [ $# -eq 0 ];
- then echo "All packages to be tested" && for package in `ls ./tests`;
- do echo "Testing $1 apk" && /bin/sh -e ./tests/$1 >> "$OUTFILE" 2>&1 && echo "$1 passed tests" >> "$OUTFILE" && echo "$1 passed tests";
- done && exit 0;
+ then totaltests=`ls ./tests/ | wc -w` && echo "All (${totaltests}) packages to be tested" && passedtests="0" && for package in `ls ./tests/`;
+ do echo "Testing $package apk" && /bin/sh -e ./tests/$package $package >> "$OUTFILE" 2>&1 && echo "$package passed tests" >> "$OUTFILE" && echo "$package passed tests" && passedtests=$((passedtests + 1));
+ done && echo "$passedtests of $totaltests passed" && exit 0;
fi
# If script still running, there's args, so test all specified packages
@@ -54,9 +54,9 @@ while [ $# -gt 0 ]; do
test -e ./tests/$PACKAGE
# If no testing file exists then run generic-apk
if [ "$?" == "1" ];
- then echo "Testing file for $PACKAGE does not exist" && /bin/sh -e ./tests/generic-apk >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;
+ then echo "Testing file for $PACKAGE does not exist" && /bin/sh -e ./tests/generic-apk $PACKAGE >> "$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;
+ else echo "Testing $PACKAGE apk" && /bin/sh -e ./tests/$PACKAGE $PACKAGE >> "$OUTFILE" 2>&1 && echo "$PACKAGE passed tests" && exit 0;
fi
i=$(( $i + 1 ))
shift