diff options
author | Arun Isaac | 2025-08-24 12:33:55 +0100 |
---|---|---|
committer | Arun Isaac | 2025-08-24 14:24:11 +0100 |
commit | 14845d344ef346029fc58b7c66be6bc43b70a661 (patch) | |
tree | 0621c55ff85841ff3bb02bca438c417d434dd442 /e2e-tests | |
parent | ace57b16ee9fa46aaeb2a9f7980ecd24d97aa26c (diff) | |
download | ravanan-14845d344ef346029fc58b7c66be6bc43b70a661.tar.gz ravanan-14845d344ef346029fc58b7c66be6bc43b70a661.tar.lz ravanan-14845d344ef346029fc58b7c66be6bc43b70a661.zip |
Add end-to-end tests.
End-to-end tests allow us to test the whole of ravanan. This is a useful sanity check to ensure that basic workflows remain working.
Diffstat (limited to 'e2e-tests')
-rw-r--r-- | e2e-tests/.gitignore | 1 | ||||
-rw-r--r-- | e2e-tests/Makefile | 37 | ||||
-rw-r--r-- | e2e-tests/jobs/hello-world.yaml | 1 | ||||
-rw-r--r-- | e2e-tests/manifest.scm | 2 | ||||
-rw-r--r-- | e2e-tests/tests.yaml | 9 | ||||
-rw-r--r-- | e2e-tests/tools/hello-world.scm | 3 |
6 files changed, 53 insertions, 0 deletions
diff --git a/e2e-tests/.gitignore b/e2e-tests/.gitignore new file mode 100644 index 0000000..321232f --- /dev/null +++ b/e2e-tests/.gitignore @@ -0,0 +1 @@ +tools/*.cwl \ No newline at end of file diff --git a/e2e-tests/Makefile b/e2e-tests/Makefile new file mode 100644 index 0000000..1410a6d --- /dev/null +++ b/e2e-tests/Makefile @@ -0,0 +1,37 @@ +# ravanan --- High-reproducibility CWL runner powered by Guix +# Copyright © 2025 Arun Isaac <arunisaac@systemreboot.net> +# +# This file is part of ravanan. +# +# ravanan is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# ravanan is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with ravanan. If not, see <https://www.gnu.org/licenses/>. + +CCWL ?= ccwl +CWLTEST ?= cwltest + +tools_directory = tools +tool_ccwl = $(wildcard $(tools_directory)/*.scm) +tool_cwl = $(tool_ccwl:.scm=.cwl) + +all: $(tool_cwl) + +%.cwl: %.scm + $(CCWL) compile $^ > $@ + +.PHONY: check clean +check: + mkdir -p /tmp/cwltest-tmpdir + TMPDIR=/tmp/cwltest-tmpdir ../pre-inst-env $(CWLTEST) --test tests.yaml --tool ravanan -- --store=store --guix-manifest=manifest.scm + +clean: + rm -f $(tool_cwl) diff --git a/e2e-tests/jobs/hello-world.yaml b/e2e-tests/jobs/hello-world.yaml new file mode 100644 index 0000000..5329e73 --- /dev/null +++ b/e2e-tests/jobs/hello-world.yaml @@ -0,0 +1 @@ +message: Hello world! diff --git a/e2e-tests/manifest.scm b/e2e-tests/manifest.scm new file mode 100644 index 0000000..da7eb55 --- /dev/null +++ b/e2e-tests/manifest.scm @@ -0,0 +1,2 @@ +(specifications->manifest + (list "coreutils")) diff --git a/e2e-tests/tests.yaml b/e2e-tests/tests.yaml new file mode 100644 index 0000000..5c0ab22 --- /dev/null +++ b/e2e-tests/tests.yaml @@ -0,0 +1,9 @@ +- id: hello-world + doc: Hello world! + tool: tools/hello-world.cwl + job: jobs/hello-world.yaml + output: + output_message: + class: File + size: 13 + checksum: sha1$47a013e660d408619d894b20806b1d5086aab03b diff --git a/e2e-tests/tools/hello-world.scm b/e2e-tests/tools/hello-world.scm new file mode 100644 index 0000000..a037a36 --- /dev/null +++ b/e2e-tests/tools/hello-world.scm @@ -0,0 +1,3 @@ +(command #:inputs (message #:type string) + #:run "echo" message + #:outputs (output_message #:type stdout)) |