Skip to content

Commit

Permalink
add CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
perazz committed May 24, 2024
1 parent 0004628 commit cb157c4
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb157c4

Please sign in to comment.