diff options
author | Mathieu Othacehe <othacehe@gnu.org> | 2025-06-29 15:52:47 +0200 |
---|---|---|
committer | Mathieu Othacehe <othacehe@gnu.org> | 2025-07-01 11:50:16 +0200 |
commit | 11b5443e48f9c0d24ae58ac15a35246fa76b71d6 (patch) | |
tree | 070f8b6e490d07a5798ecd43c874a8fa8ced7af1 /gnu/tests | |
parent | f3a8db842d8de40fe0f5cfdce3b0389dec926c97 (diff) |
tests: Support basic tests extension with an extra-tests argument.
* gnu/tests/base.scm (run-basic-test)[extra-tests]: New argument.
Change-Id: Ia3595638309738d3361c583c93a66e0a872adabe
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/base.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 720a5eb10d..d60eef2b11 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -74,7 +74,8 @@ #:key initialization root-password - desktop?) + desktop? + extra-tests) "Return a derivation called NAME that tests basic features of the OS started using COMMAND, a gexp that evaluates to a list of strings. Compare some properties of running system to what's declared in OS, an <operating-system>. @@ -85,7 +86,12 @@ inserted before the first test. This is used to introduce an extra initialization step, such as entering a LUKS passphrase. When ROOT-PASSWORD is true, enter it as the root password when logging in. -Otherwise assume that there is no password for root." +Otherwise assume that there is no password for root. + +When EXTRA-TESTS is true, it must be a one-argument procedure that is +passed a gexp denoting the marionette. It must then return a gexp that is +inserted after the last test. This is meant as a way of extending the basic +tests that are defined within this procedure." (define special-files (service-value (fold-services (operating-system-services os) @@ -581,6 +587,9 @@ test \"$BASHRC_D_OK\" = yes")) (compose string-trim-right get-string-all))) marionette)) + #$(and extra-tests + (extra-tests #~marionette)) + (test-end)))) (gexp->derivation name test)) |