diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-03-19 23:10:25 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-03-19 23:17:32 +0100 |
commit | be0a672c30ad1401019abb5cb83d59be171813d0 (patch) | |
tree | 5d80f1228b7c705625396400ff29da6ae7c098be /gnu/tests | |
parent | f08b6726611ec9391814fe540821a3964baeb0ba (diff) | |
download | guix-be0a672c30ad1401019abb5cb83d59be171813d0.tar.gz guix-be0a672c30ad1401019abb5cb83d59be171813d0.zip |
tests: Accept manual installation scripts that exit with SIGTERM.
Fixes <https://bugs.gnu.org/39926>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.
Previously we'd error out if the installation script exits with
non-zero, which was the case because the 'reboot' program would
typically not get a reply, and thus would eventually be killed by PID 1
as the system is brought down.
* gnu/tests/install.scm (run-install)[install]: Expect SCRIPT to exit
with SIGTERM in addition to exiting with zero.
Diffstat (limited to 'gnu/tests')
-rw-r--r-- | gnu/tests/install.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm index 9ecc45cc04..4f650ffb34 100644 --- a/gnu/tests/install.scm +++ b/gnu/tests/install.scm @@ -270,8 +270,12 @@ packages defined in installation-os." (lambda (port) (write '#$target-os-source port))) marionette) - (exit (marionette-eval '(zero? (system #$script)) - marionette))) + + ;; Run SCRIPT. It typically invokes 'reboot' as a last step and + ;; thus normally gets killed with SIGTERM by PID 1. + (let ((status (marionette-eval '(system #$script) marionette))) + (exit (or (equal? (status:term-sig status) SIGTERM) + (equal? (status:exit-val status) 0))))) (when #$(->bool gui-test) (wait-for-unix-socket "/var/guix/installer-socket" |