aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2021-05-27 20:04:51 +0200
committerSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2021-05-27 20:09:13 +0200
commit3c9e6105c8458f6a59d2edc6fd7f2e79c18de943 (patch)
tree7c6f9a5e47460f7661941e1e866571036a84c1b7 /ci
parent6d9004d93460dc15b99051c90d1b58d724b010e6 (diff)
downloadfpm-3c9e6105c8458f6a59d2edc6fd7f2e79c18de943.tar.gz
fpm-3c9e6105c8458f6a59d2edc6fd7f2e79c18de943.zip
Allow fpm to change the working directory
Diffstat (limited to 'ci')
-rwxr-xr-xci/run_tests.sh144
1 files changed, 64 insertions, 80 deletions
diff --git a/ci/run_tests.sh b/ci/run_tests.sh
index ffcd9c2..a31fa18 100755
--- a/ci/run_tests.sh
+++ b/ci/run_tests.sh
@@ -13,86 +13,70 @@ fi
pushd example_packages/
rm -rf ./*/build
-pushd hello_world
-"$fpm" build
-"$fpm" run --target hello_world
-"$fpm" run
-popd
-
-pushd hello_fpm
-"$fpm" build
-"$fpm" run --target hello_fpm
-popd
-
-pushd circular_test
-"$fpm" build
-popd
-
-pushd circular_example
-"$fpm" build
-popd
-
-pushd hello_complex
-"$fpm" build
-"$fpm" test
-"$fpm" run --target say_Hello
-"$fpm" run --target say_goodbye
-"$fpm" test --target greet_test
-"$fpm" test --target farewell_test
-popd
-
-pushd hello_complex_2
-"$fpm" build
-"$fpm" run --target say_hello_world
-"$fpm" run --target say_goodbye
-"$fpm" test --target greet_test
-"$fpm" test --target farewell_test
-popd
-
-pushd with_examples
-"$fpm" build
-"$fpm" run --example --target demo-prog
-"$fpm" run --target demo-prog
-popd
-
-pushd auto_discovery_off
-"$fpm" build
-"$fpm" run --target auto_discovery_off
-"$fpm" test --target my_test
-test ! -x ./build/gfortran_*/app/unused
-test ! -x ./build/gfortran_*/test/unused_test
-popd
-
-pushd with_c
-"$fpm" build
-"$fpm" run --target with_c
-popd
-
-pushd submodules
-"$fpm" build
-popd
-
-pushd program_with_module
-"$fpm" build
-"$fpm" run --target Program_with_module
-popd
-
-pushd link_executable
-"$fpm" build
-"$fpm" run --target gomp_test
-popd
-
-pushd fortran_includes
-"$fpm" build
-popd
-
-pushd c_includes
-"$fpm" build
-popd
-
-pushd c_header_only
-"$fpm" build
-popd
+dir=hello_world
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target hello_world
+"$fpm" -C $dir run
+
+dir=hello_fpm
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target hello_fpm
+
+dir=circular_test
+"$fpm" -C $dir build
+
+dir=circular_example
+"$fpm" -C $dir build
+
+dir=hello_complex
+"$fpm" -C $dir build
+"$fpm" -C $dir test
+"$fpm" -C $dir run --target say_Hello
+"$fpm" -C $dir run --target say_goodbye
+"$fpm" -C $dir test --target greet_test
+"$fpm" -C $dir test --target farewell_test
+
+dir=hello_complex_2
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target say_hello_world
+"$fpm" -C $dir run --target say_goodbye
+"$fpm" -C $dir test --target greet_test
+"$fpm" -C $dir test --target farewell_test
+
+dir=with_examples
+"$fpm" -C $dir build
+"$fpm" -C $dir run --example --target demo-prog
+"$fpm" -C $dir run --target demo-prog
+
+dir=auto_discovery_off
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target auto_discovery_off
+"$fpm" -C $dir test --target my_test
+test ! -x $dir/build/gfortran_*/app/unused
+test ! -x $dir/build/gfortran_*/test/unused_test
+
+dir=with_c
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target with_c
+
+"$fpm" -C $dir build
+
+dir=program_with_module
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target Program_with_module
+
+dir=link_executable
+"$fpm" -C $dir build
+"$fpm" -C $dir run --target gomp_test
+
+dir=fortran_includes
+"$fpm" -C $dir build
+
+dir=c_includes
+"$fpm" -C $dir build
+
+dir=c_header_only
+"$fpm" -C $dir build
# Cleanup
rm -rf ./*/build