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
|
||||
|
||||
pass=0
|
||||
fail=0
|
||||
|
||||
|
||||
while read test_file; do
|
||||
print_path=$(realpath --relative-to="$org_dir" "$test_file")
|
||||
set +e
|
||||
diff_results=$("$compare_bin" "$test_file")
|
||||
diff_status=$?
|
||||
set -e
|
||||
if [ $diff_status -eq 0 ]; then
|
||||
echo "GOOD $test_file"
|
||||
echo "GOOD $print_path"
|
||||
pass=$((pass + 1))
|
||||
else
|
||||
echo "BAD $test_file"
|
||||
echo "BAD $print_path"
|
||||
fail=$((fail + 1))
|
||||
fi
|
||||
done<<<"$test_files"
|
||||
|
||||
total=$((pass + fail))
|
||||
(>&2 echo "Tests passed: $pass/$total")
|
||||
|
Loading…
Reference in New Issue
Block a user