From e1c3db05168d0417b3ac5465517c7e6957b28bb5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 28 Jul 2022 20:20:57 +0200 Subject: tests: run_tests.sh: substitute dynamic test directory path in output Replace all occurrences for the test file directory path with "." in stderr and stdout results to ensure stable test outputs. Signed-off-by: Jo-Philipp Wich --- tests/custom/run_tests.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/custom/run_tests.sh') diff --git a/tests/custom/run_tests.sh b/tests/custom/run_tests.sh index fb92379..96ac783 100755 --- a/tests/custom/run_tests.sh +++ b/tests/custom/run_tests.sh @@ -105,6 +105,8 @@ run_testcase() { printf "%d\n" $? > "$dir/res.code" touch "$dir/empty" + sed -i -e "s#$dir#.#g" "$dir/res.out" "$dir/res.err" + if ! cmp -s "$dir/res.err" "${err:-$dir/empty}"; then [ $fail = 0 ] && printf "!\n" printf "Testcase #%d: Expected stderr did not match:\n" $num -- cgit v1.2.3