summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/run_tests.sh
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-07-28 20:20:57 +0200
committerJo-Philipp Wich <jo@mein.io>2022-07-30 00:41:56 +0200
commite1c3db05168d0417b3ac5465517c7e6957b28bb5 (patch)
tree6ef47d206c65f1a4151805091bbaa5732333848b /tests/custom/run_tests.sh
parent3c168b5184ebd217ea276bf374d28bbf937681fd (diff)
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 <jo@mein.io>
Diffstat (limited to 'tests/custom/run_tests.sh')
-rwxr-xr-xtests/custom/run_tests.sh2
1 files changed, 2 insertions, 0 deletions
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