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_fs_build.sh | 4 ++-- src/build_tree/ak_logcatter_build.sh | 7 ++++++- src/build_tree/ak_settings_build.sh | 7 ++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/build_tree/ak_fs_build.sh b/src/build_tree/ak_fs_build.sh index d45fb0a..a18b824 100755 --- a/src/build_tree/ak_fs_build.sh +++ b/src/build_tree/ak_fs_build.sh @@ -5,11 +5,11 @@ gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include akfs.c -o echo "Building tests/test_akfs" && \ gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akfs.c lib/akfs.so -o tests/test_akfs && \ echo "Running test_akfs" && \ -time ./tests/test_akfs +time ./tests/test_akfs && \ rm ./tests/test_akfs echo "Building tests/test_akfs_mkdir.c" && \ gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_akfs_mkdir.c lib/akfs.so -o tests/test_akfs_mkdir && \ echo "Running test_akfs_mkdir" && \ -time ./tests/test_akfs_mkdir +time ./tests/test_akfs_mkdir && \ rm ./tests/test_akfs_mkdir 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 diff --git a/src/build_tree/ak_settings_build.sh b/src/build_tree/ak_settings_build.sh index 5edcd19..99689e3 100755 --- a/src/build_tree/ak_settings_build.sh +++ b/src/build_tree/ak_settings_build.sh @@ -1,2 +1,7 @@ -echo "Building lib/aksettings.so" && gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aksettings.c -o lib/aksettings.so && echo "Building tests/test_aksettings" && gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aksettings.c lib/aksettings.so -o tests/test_aksettings && echo "Running test_aksettings" && time ./tests/test_aksettings +echo "Building lib/aksettings.so" && \ +gcc -c -shared -Wextra -Wall -Werror -pedantic -ggdb -fPIC -I./include aksettings.c -o lib/aksettings.so && \ +echo "Building tests/test_aksettings" && \ +gcc -Wextra -Wall -Werror -pedantic -ggdb -Wl,-rpath=lib -I./include tests/test_aksettings.c lib/aksettings.so -o tests/test_aksettings && \ +echo "Running test_aksettings" && \ +time ./tests/test_aksettings && \ rm ./tests/test_aksettings -- cgit v1.2.3