Skip to content

Commit cb157c4

Browse files
committed
add CI tests
1 parent 0004628 commit cb157c4

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

ci/run_tests.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,36 @@ pushd with_examples
5959
popd
6060

6161
pushd many_examples
62-
"$fpm" build
62+
6363
"$fpm" run --example --all
6464
test -e demo1.txt
6565
test -e demo2.txt
6666
popd
6767

68+
# Test building individual targets
69+
pushd many_targets
70+
cases=( "1" "2" "3" )
71+
targets=( "run" "example" "test" )
72+
cmdrun=( "run --target" "run --example" "test --target" )
73+
for j in {0..2}
74+
do
75+
for i in {0..2}
76+
do
77+
rm -f *.txt
78+
this=${cases[$i]}
79+
others=${cases[@]/$this}
80+
filename=${targets[$j]}$this
81+
echo "$filename"
82+
"$fpm" ${cmdrun[$j]} $filename
83+
test -e $filename.txt
84+
for k in ${others[@]}
85+
do
86+
test ! -e ${targets[$k]}$k.txt
87+
done
88+
done
89+
done
90+
popd
91+
6892
pushd auto_discovery_off
6993
"$fpm" build
7094
"$fpm" run --target auto_discovery_off

0 commit comments

Comments
 (0)