From 7a811406dd16e057204bed1aa15cfe33d81ccb6b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 17 Aug 2025 23:36:54 +0300 Subject: initial commit --- scripts/run-test | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/run-test (limited to 'scripts/run-test') diff --git a/scripts/run-test b/scripts/run-test new file mode 100755 index 0000000..c971120 --- /dev/null +++ b/scripts/run-test @@ -0,0 +1,26 @@ +#!/bin/sh + +TEST="$1" +NAME=$(basename "$TEST") + +mkdir -p "reports/$NAME" + +I=0 +while :; do + # if no error happened, consider it a pass + if valgrind -q --leak-check=full --error-exitcode=1 \ + "./$TEST" > "reports/$NAME/run-$I" 2>&1 + then + echo "$NAME: PASSED" + exit 0 + fi + + # an error occured, was it handled properly? + if grep 'COVSRV: EXIT' "reports/$NAME/run-$I" >/dev/null; then + I=$((I+1)) + continue + fi + + echo "$NAME: FAILED" + exit 1 +done -- cgit v1.2.3