commit 2671ddde4b1c4263725cca888c395a6135ee1e67
parent 0bac3607805a20fdf2f3428d9f315452f9ae4938
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Sun, 14 May 2023 12:19:03 +0200
Update the run_test function of the make.sh file
Redirect the error messages of the for loop to print only the defined
error message. This was partially the case since the error messages of
the test were already redirected. But if the test was interrupted due to
an assertion, segmentation error, user interrupt, etc., the for
directive printed its own error message. Now we redirect it to /dev/null
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/make.sh b/make.sh
@@ -55,15 +55,15 @@ check()
run_test()
{
for i in "$@"; do
- test=$(echo "${i}" | sed 's/src\/\(.\{1,\}\).c$/\1/')
- if [ "${test}" = "test_s3d_sphere_instance" ] \
+ test=$(basename "${i}" ".c")
+ if [ "${test}" = "test_s3d_sphere_instance" ]\
|| [ "${test}" = "test_s3d_trace_ray" ]; then
check "${test}_legacy" "${test}"
check "${test}_filter" "${test}" filter
else
check "${test}" "${test}"
fi
- done
+ done 2> /dev/null
}
clean_test()