aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu tests security-token)
  #:use-module (gnu tests)
  #:use-module (gnu system vm)
  #:use-module (gnu services)
  #:use-module (gnu services security-token)
  #:use-module (guix gexp)
  #:export (%test-pcscd))

(define %pcscd-os
  (simple-operating-system
   (service pcscd-service-type)))

(define* (run-pcscd-test)
  "Run tests of 'pcscd-service-type'."
  (define os
    (marionette-operating-system
     %pcscd-os
     #:imported-modules '((gnu services herd))
     #:requirements '(pcscd)))

  (define test
    (with-imported-modules '((gnu build marionette))
      #~(begin
          (use-modules (srfi srfi-64)
                       (gnu build marionette))
          (define marionette
            (make-marionette (list #$(virtual-machine os))))

          (test-runner-current (system-test-runner #$output))
          (test-begin "pcscd")

          (test-assert "pcscd is alive"
            (marionette-eval
             '(begin
                (use-modules (gnu services herd)
                             (srfi srfi-1))

                (live-service-running
                 (find (lambda (live)
                         (memq 'pcscd (live-service-provision live)))
                       (current-services))))
             marionette))

          (test-end))))

  (gexp->derivation "pcscd" test))

(define %test-pcscd
  (system-test
   (name "pcscd")
   (description "Test a running pcscd daemon.")
   (value (run-pcscd-test))))
scm?id=925fe4b3cece17f564c640f536ebcf24c2af2795'>gnu: coq-coquelicot: Fix for coq 8.8....Julien Lepiller 2018-05-04gnu: coq-bignums: Update to 8.8.0....Julien Lepiller 2018-05-04gnu: coq-mathcomp: Update to 1.7.0....Julien Lepiller 2018-05-04gnu: coq-gappa: Update to 1.3.2....Julien Lepiller 2018-05-04gnu: coq-flocq: Update to 2.6.1....Julien Lepiller 2018-05-04gnu: coq: Update to 8.8.0....Julien Lepiller 2018-04-12gnu: ocaml-findlib: Return #t from all phases....Mark H Weaver 2018-04-12gnu: camlp5: Return #t from all phases....Mark H Weaver 2018-04-10Merge branch 'master' into core-updatesMark H Weaver 2018-04-06gnu: ldc, bap: Build with Clang 3.8....Marius Bakke 2018-03-29Merge branch 'master' into core-updatesMarius Bakke 2018-03-23gnu: coq-flocq: Use predictable source URI....Tobias Geerinckx-Rice 2018-03-20gnu: coq-flocq: Update phase style....Tobias Geerinckx-Rice 2018-03-20Merge branch 'master' into core-updatesMark H Weaver 2018-03-17gnu: Fix common unquote typos....Tobias Geerinckx-Rice 2018-03-16gnu: All snippets report errors using exceptions, else return #t....Mark H Weaver 2018-03-13gnu: ocaml-ssl: Declare a source file-name....Efraim Flashner 2018-03-13gnu: ocaml-lwt: Declare a source file-name....Efraim Flashner 2018-03-13gnu: ocaml-bitstring: Declare a source file-name....Efraim Flashner 2018-03-13gnu: ocaml-piqi: Declare a source file-name....Efraim Flashner 2018-03-13gnu: ocaml-result: Declare a source file-name....Efraim Flashner 2018-03-13gnu: ocaml-stringext: Declare a source file-name....Efraim Flashner 2018-03-13gnu: ocaml-qtest: Update to 2.8....Efraim Flashner 2018-03-13gnu: ocaml-qtest: Declare a source file-name....Efraim Flashner 2018-02-03Merge branch 'master' into core-updatesMark H Weaver 2018-02-01gnu: ocaml-findlib: Update to 1.7.3....Peter Kreye 2018-02-01gnu: Add ocaml-tsdl....Peter Kreye 2018-02-01gnu: Add ocaml-ocb-stubblr....Peter Kreye 2018-02-01gnu: Add ocaml-ctypes....Peter Kreye 2018-02-01gnu: Add ocaml-integers....Peter Kreye 2018-02-01gnu: ocaml-findlib-1.7.3: Fix install....Peter Kreye