aboutsummaryrefslogtreecommitdiff
path: root/tests/tests.scm
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2026-09-02 16:18:23 -0300
committerEuAndreh <eu@euandre.org>2026-09-03 13:26:02 -0300
commit46422e73b86f3c0899345dfdcbbf621771b5f666 (patch)
tree7e27a7563395e76c5db827238ef22cf5b792a60d /tests/tests.scm
parentsrc/org/euandre/queue.scm: Disable tests for new python-build-system (diff)
downloadpackages-46422e73b86f3c0899345dfdcbbf621771b5f666.tar.gz
packages-46422e73b86f3c0899345dfdcbbf621771b5f666.tar.xz
Depend on pkgs and move code there; drop other distros but guix
Diffstat (limited to '')
-rw-r--r--tests/tests.scm71
1 files changed, 71 insertions, 0 deletions
diff --git a/tests/tests.scm b/tests/tests.scm
new file mode 100644
index 0000000..852a186
--- /dev/null
+++ b/tests/tests.scm
@@ -0,0 +1,71 @@
+(use-modules
+ ((im papo packages) #:prefix pkgs:)
+ ((org euandre packages) #:prefix packages:)
+ (gnu)
+ (gnu tests)
+ (gnu system vm)
+ (guix gexp)
+ (guix profiles))
+(use-package-modules
+ tls)
+(use-service-modules
+ certbot
+ mail
+ mcron
+ networking)
+
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Helpers functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define (test-for name description test-name os test-fn)
+ (system-test
+ (name name)
+ (description description)
+ (value
+ (gexp->derivation
+ (string-append test-name ".test")
+ (with-imported-modules '((gnu build marionette))
+ #~(begin
+ (use-modules
+ ((gnu build marionette) #:prefix mrntt:)
+ ((srfi srfi-64) #:prefix t:))
+ (let ((manette (mrntt:make-marionette
+ (list
+ #$(virtual-machine
+ (operating-system
+ (marionette-operating-system
+ os
+ #:imported-modules
+ '((gnu services herd)))))))))
+ (t:test-runner-current (mrntt:system-test-runner #$output))
+ (t:test-begin #$name)
+ (#$test-fn manette)
+ (t:test-end))))))))
+
+
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Service tests ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+(define tests
+ (list))
+
+(define (system-test->manifest-entry test)
+ (manifest-entry
+ (name
+ (pkgs:str "test."
+ (system-test-name test)))
+ (version "0")
+ (item test)))
+
+(manifest
+ (map system-test->manifest-entry
+ tests))