From 4605283d0ae4111cedb78c34b967d8274647c004 Mon Sep 17 00:00:00 2001 From: kaotisk Date: Fri, 28 Mar 2025 17:18:21 +0200 Subject: Remove test binaries only if execution was successful --- src/build_tree/ak_logcatter_build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/build_tree/ak_logcatter_build.sh') diff --git a/src/build_tree/ak_logcatter_build.sh b/src/build_tree/ak_logcatter_build.sh index 91a1805..5038073 100755 --- a/src/build_tree/ak_logcatter_build.sh +++ b/src/build_tree/ak_logcatter_build.sh @@ -1,2 +1,7 @@ -echo "Building lib/aklogcatter.so" && gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aklogcatter.c -o lib/aklogcatter.so && echo "Building tests/test_aklogcatter" && gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklogcatter.c lib/aklog.so lib/aklogcatter.so -o tests/test_aklogcatter && echo "Running test_aklogcatter" && time ./tests/test_aklogcatter +echo "Building lib/aklogcatter.so" && \ +gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aklogcatter.c -o lib/aklogcatter.so && \ +echo "Building tests/test_aklogcatter" && \ +gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aklogcatter.c lib/aklog.so lib/aklogcatter.so -o tests/test_aklogcatter && \ +echo "Running test_aklogcatter" && \ +time ./tests/test_aklogcatter && \ rm ./tests/test_aklogcatter -- cgit v1.2.3