aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej@certik.us>2020-01-12 17:43:43 +0000
committerOndřej Čertík <ondrej@certik.us>2020-01-12 17:43:43 +0000
commit66971b3a4b0d06925aee05a772bb61233e54ac2f (patch)
treee98e15cc1a9c9599d079bc27a6e546339a74f9ad
parentd299de0bd577b1aee121cdd728451af3ad857791 (diff)
parent0ce4220d7173a1dea93d5ec0a566d523ec4f23c2 (diff)
downloadfpm-66971b3a4b0d06925aee05a772bb61233e54ac2f.tar.gz
fpm-66971b3a4b0d06925aee05a772bb61233e54ac2f.zip
Merge branch 'tests' into 'master'
Add tests See merge request certik/fpm!4
-rw-r--r--.gitlab-ci.yml1
-rwxr-xr-xrun_tests.sh8
-rw-r--r--tests/1/a.f9011
-rw-r--r--tests/1/b.f9010
-rw-r--r--tests/1/main.f908
5 files changed, 38 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d1a4cae..042dff0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -9,6 +9,7 @@ rust-latest:
- cargo test --verbose
- touch a.f90 b.f90 c.f90
- cargo run -- build
+ - ./run_tests.sh
rust-nightly:
stage: build
diff --git a/run_tests.sh b/run_tests.sh
new file mode 100755
index 0000000..123acb2
--- /dev/null
+++ b/run_tests.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+set -ex
+
+fpm=$(pwd)/target/debug/fpm
+
+cd tests/1
+${fpm} build
diff --git a/tests/1/a.f90 b/tests/1/a.f90
new file mode 100644
index 0000000..a4f64a2
--- /dev/null
+++ b/tests/1/a.f90
@@ -0,0 +1,11 @@
+module a
+use b, only: g
+implicit none
+
+contains
+
+ subroutine f()
+ call g()
+ end subroutine
+
+end module
diff --git a/tests/1/b.f90 b/tests/1/b.f90
new file mode 100644
index 0000000..8b57633
--- /dev/null
+++ b/tests/1/b.f90
@@ -0,0 +1,10 @@
+module b
+implicit none
+
+contains
+
+ subroutine g()
+ print *, "g()"
+ end subroutine
+
+end module
diff --git a/tests/1/main.f90 b/tests/1/main.f90
new file mode 100644
index 0000000..75914de
--- /dev/null
+++ b/tests/1/main.f90
@@ -0,0 +1,8 @@
+program test1
+use a, only: f
+implicit none
+
+call f()
+
+print *, "OK"
+end