[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/08: tests: ssh: Make sure we can run executables from PATH.
From: |
Marius Bakke |
Subject: |
05/08: tests: ssh: Make sure we can run executables from PATH. |
Date: |
Wed, 1 Nov 2017 16:35:32 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 5d7141cd284eac3afe43d800104daffdf65dce52
Author: Marius Bakke <address@hidden>
Date: Sun Oct 29 15:59:54 2017 +0100
tests: ssh: Make sure we can run executables from PATH.
* gnu/tests/ssh.scm (run-ssh-test): Add tests for running commands in system
and user profile.
---
gnu/tests/ssh.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/gnu/tests/ssh.scm b/gnu/tests/ssh.scm
index 41be360..6abc6c2 100644
--- a/gnu/tests/ssh.scm
+++ b/gnu/tests/ssh.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017 Ludovic Courtès <address@hidden>
;;; Copyright © 2017 Clément Lassieur <address@hidden>
+;;; Copyright © 2017 Marius Bakke <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -169,6 +170,33 @@ root with an empty password."
(call-with-remote-input-file sftp-session witness
read)))))
+ ;; Connect to the guest over SSH. Make sure we can run commands
+ ;; from the system profile.
+ (test-equal "run executables from system profile"
+ #t
+ (call-with-connected-session/auth
+ (lambda (session)
+ (let ((channel (make-channel session)))
+ (channel-open-session channel)
+ (channel-request-exec
+ channel
+ (string-append
+ "mkdir -p /root/.guix-profile/bin && "
+ "touch /root/.guix-profile/bin/path-witness && "
+ "chmod 755 /root/.guix-profile/bin/path-witness"))
+ (zero? (channel-get-exit-status channel))))))
+
+ ;; Connect to the guest over SSH. Make sure we can run commands
+ ;; from the user profile.
+ (test-equal "run executable from user profile"
+ #t
+ (call-with-connected-session/auth
+ (lambda (session)
+ (let ((channel (make-channel session)))
+ (channel-open-session channel)
+ (channel-request-exec channel "path-witness")
+ (zero? (channel-get-exit-status channel))))))
+
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0)))))
- branch master updated (5010d0e -> 88b3501), Marius Bakke, 2017/11/01
- 01/08: gnu: Add perl-test-command., Marius Bakke, 2017/11/01
- 02/08: gnu: feh: Enable tests., Marius Bakke, 2017/11/01
- 03/08: system: Test for interactive shell instead of `cat` in skeleton '.bashrc'., Marius Bakke, 2017/11/01
- 04/08: system: Return early in skeleton '.bashrc' when the shell is non-interactive., Marius Bakke, 2017/11/01
- 06/08: gnu: libass: Update to 0.14.0., Marius Bakke, 2017/11/01
- 08/08: gnu: git: Update to 2.15.0., Marius Bakke, 2017/11/01
- 05/08: tests: ssh: Make sure we can run executables from PATH.,
Marius Bakke <=
- 07/08: gnu: imagemagick: Update to 6.9.9-21., Marius Bakke, 2017/11/01