Count pass/fail stats for compare parse script.
This commit is contained in:
parent
89040c51a6
commit
8b811bec95
@ -13,15 +13,24 @@ test_files=$(find $org_dir -type f -name '*.org' | sort)
|
|||||||
|
|
||||||
cargo build --bin org_compare
|
cargo build --bin org_compare
|
||||||
|
|
||||||
|
pass=0
|
||||||
|
fail=0
|
||||||
|
|
||||||
|
|
||||||
while read test_file; do
|
while read test_file; do
|
||||||
|
print_path=$(realpath --relative-to="$org_dir" "$test_file")
|
||||||
set +e
|
set +e
|
||||||
diff_results=$("$compare_bin" "$test_file")
|
diff_results=$("$compare_bin" "$test_file")
|
||||||
diff_status=$?
|
diff_status=$?
|
||||||
set -e
|
set -e
|
||||||
if [ $diff_status -eq 0 ]; then
|
if [ $diff_status -eq 0 ]; then
|
||||||
echo "GOOD $test_file"
|
echo "GOOD $print_path"
|
||||||
|
pass=$((pass + 1))
|
||||||
else
|
else
|
||||||
echo "BAD $test_file"
|
echo "BAD $print_path"
|
||||||
|
fail=$((fail + 1))
|
||||||
fi
|
fi
|
||||||
done<<<"$test_files"
|
done<<<"$test_files"
|
||||||
|
|
||||||
|
total=$((pass + fail))
|
||||||
|
(>&2 echo "Tests passed: $pass/$total")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user