aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/docker.scm19
-rw-r--r--gnu/tests/singularity.scm9
2 files changed, 21 insertions, 7 deletions
diff --git a/gnu/tests/docker.scm b/gnu/tests/docker.scm
index 3cd3a27884..f2674cdbe8 100644
--- a/gnu/tests/docker.scm
+++ b/gnu/tests/docker.scm
@@ -101,7 +101,7 @@ inside %DOCKER-OS."
marionette))
(test-equal "Load docker image and run it"
- "hello world"
+ '("hello world" "hi!")
(marionette-eval
`(begin
(define slurp
@@ -117,12 +117,16 @@ inside %DOCKER-OS."
(repository&tag (string-drop raw-line
(string-length
"Loaded image: ")))
- (response (slurp
- ,(string-append #$docker-cli "/bin/docker")
- "run" "--entrypoint" "bin/Guile"
- repository&tag
- "/aa.scm")))
- response))
+ (response1 (slurp
+ ,(string-append #$docker-cli "/bin/docker")
+ "run" "--entrypoint" "bin/Guile"
+ repository&tag
+ "/aa.scm"))
+ (response2 (slurp ;default entry point
+ ,(string-append #$docker-cli "/bin/docker")
+ "run" repository&tag
+ "-c" "(display \"hi!\")")))
+ (list response1 response2)))
marionette))
(test-end)
@@ -161,6 +165,7 @@ standard output device and then enters a new line.")
(tarball (docker-image "docker-pack" profile
#:symlinks '(("/bin/Guile" -> "bin/guile")
("aa.scm" -> "a.scm"))
+ #:entry-point "bin/guile"
#:localstatedir? #t)))
(run-docker-test tarball)))
diff --git a/gnu/tests/singularity.scm b/gnu/tests/singularity.scm
index 55324ef9ea..668043a0bc 100644
--- a/gnu/tests/singularity.scm
+++ b/gnu/tests/singularity.scm
@@ -103,6 +103,14 @@
(cdr (waitpid pid)))))
marionette))
+ (test-equal "singularity run" ;test the entry point
+ 42
+ (marionette-eval
+ `(status:exit-val
+ (system* #$(file-append singularity "/bin/singularity")
+ "run" #$image "-c" "(exit 42)"))
+ marionette))
+
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0)))))
@@ -118,6 +126,7 @@
#:hooks '()
#:locales? #f))
(tarball (squashfs-image "singularity-pack" profile
+ #:entry-point "bin/guile"
#:symlinks '(("/bin" -> "bin")))))
(run-singularity-test tarball)))