From cb157c40a5d65fba48f0e18d1f498c445d008dec Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Fri, 24 May 2024 20:04:24 +0200 Subject: [PATCH] add CI tests --- ci/run_tests.sh | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 4a0b8d621c..0b7fc8e057 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -59,12 +59,36 @@ pushd with_examples popd pushd many_examples -"$fpm" build + "$fpm" run --example --all test -e demo1.txt test -e demo2.txt popd +# Test building individual targets +pushd many_targets +cases=( "1" "2" "3" ) +targets=( "run" "example" "test" ) +cmdrun=( "run --target" "run --example" "test --target" ) +for j in {0..2} +do + for i in {0..2} + do + rm -f *.txt + this=${cases[$i]} + others=${cases[@]/$this} + filename=${targets[$j]}$this + echo "$filename" + "$fpm" ${cmdrun[$j]} $filename + test -e $filename.txt + for k in ${others[@]} + do + test ! -e ${targets[$k]}$k.txt + done + done +done +popd + pushd auto_discovery_off "$fpm" build "$fpm" run --target auto_discovery_off