git stults online reflex / master testall
master

Tree @master (Download .tar.gz)

testall @masterraw · history · blame

#!/bin/bash

num_passed=0
num_failed=0
passed=()
failed=()
for f in test/*.rx; do
    base=$(basename $f)
    echo "running on $base"
    ./rx $f
    if [ $? -ne 0 ]; then
	echo "$base test failed"
	((num_failed++))
	failed+=( "$base" )
    else
	((num_passed++))
	passed+=( "$base" )
    fi
    echo
done
echo "TEST SUMMARY: $num_passed passed, $num_failed failed"
echo "failed ($num_failed)"
if [[ "${#failed[@]}" -ne 0 ]]; then
    for f in "${failed[@]}"; do
	echo "  $f"
    done
fi
echo "passed ($num_passed)"
if [[ "${#passed[@]}" -ne 0 ]]; then
    for p in "${passed[@]}"; do
	echo "  $p"
    done
fi