simplify to exit(1) on first tool with >= 1 failure.
@@ -2,20 +2,17 @@ set -e;
STARTWD=$(pwd);
FAILURES=0;
-TEST_PASSES=0;
TOOL_PASSES=""
TOOL_FAILURES=""
-for dir in $(ls); do
- echo $dir
- [ -d $dir ] || continue
- echo "Testing bedtools $dir:"
- (cd $dir bash && bash test-$dir.sh) || FAILURES=$(expr $FAILURES + 1);
- if [ $? -eq 0 ]; then
- TEST_PASSES=$((TEST_PASSES + 1))
- TOOL_PASSES="$TOOL_PASSES $dir"
+for tool in $(ls); do
+ [ -d $tool ] || continue
+ echo "Testing bedtools $tool:"
+ (cd $tool bash && bash test-$tool.sh) || FAILURES=$(expr $FAILURES + 1);
+ if [ $FAILURES -eq 0 ]; then
+ TOOL_PASSES="$TOOL_PASSES $tool"
else
- failed="$failed $dir"
+ TOOL_FAILURES="$TOOL_FAILURES $tool"
fi
done
@@ -25,8 +22,7 @@ echo "--------------------------"
echo " Test Results "
echo "--------------------------"
echo "Tools passing: $TOOL_PASSES"
-echo "Tools with failures: $TOOL_FAILURES"
-echo "Tests failed: $FAILURES"
+echo "Tools failing: $TOOL_FAILURES"
if [[ $FAILURES -gt 0 ]]; then
exit 1;
