diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-06-20 21:51:59 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-06-20 23:50:46 +0200 |
| commit | 94b4274d0dc5768bac255980c7e785bd3dff261f (patch) | |
| tree | 831481b9a1c7189c326cdb6c549d863f673b64c9 /gnu/tests.scm | |
| parent | b1dd6ac55d567ca3a1a063efe2a003a9fee9458c (diff) | |
tests: Add system installation test.
* gnu/tests.scm (define-os-with-source): New macro.
* gnu/tests/install.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* build-aux/run-system-tests.scm (%system-tests): Likewise.
Diffstat (limited to 'gnu/tests.scm')
| -rw-r--r-- | gnu/tests.scm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gnu/tests.scm b/gnu/tests.scm index 7ca80ebf0ef..348b5ad40fa 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm | |||
| @@ -22,7 +22,8 @@ | |||
| 22 | #:use-module (gnu services) | 22 | #:use-module (gnu services) |
| 23 | #:use-module (gnu services shepherd) | 23 | #:use-module (gnu services shepherd) |
| 24 | #:export (marionette-service-type | 24 | #:export (marionette-service-type |
| 25 | marionette-operating-system)) | 25 | marionette-operating-system |
| 26 | define-os-with-source)) | ||
| 26 | 27 | ||
| 27 | ;;; Commentary: | 28 | ;;; Commentary: |
| 28 | ;;; | 29 | ;;; |
| @@ -127,4 +128,23 @@ in a virtual machine--i.e., controlled from the host system." | |||
| 127 | (services (cons (service marionette-service-type imported-modules) | 128 | (services (cons (service marionette-service-type imported-modules) |
| 128 | (operating-system-user-services os))))) | 129 | (operating-system-user-services os))))) |
| 129 | 130 | ||
| 131 | (define-syntax define-os-with-source | ||
| 132 | (syntax-rules (use-modules operating-system) | ||
| 133 | "Define two variables: OS containing the given operating system, and | ||
| 134 | SOURCE containing the source to define OS as an sexp. | ||
| 135 | |||
| 136 | This is convenient when we need both the <operating-system> object so we can | ||
| 137 | instantiate it, and the source to create it so we can store in in a file in | ||
| 138 | the system under test." | ||
| 139 | ((_ (os source) | ||
| 140 | (use-modules modules ...) | ||
| 141 | (operating-system fields ...)) | ||
| 142 | (begin | ||
| 143 | (define os | ||
| 144 | (operating-system fields ...)) | ||
| 145 | (define source | ||
| 146 | '(begin | ||
| 147 | (use-modules modules ...) | ||
| 148 | (operating-system fields ...))))))) | ||
| 149 | |||
| 130 | ;;; tests.scm ends here | 150 | ;;; tests.scm ends here |
