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))))
ovic Courtès 2015-02-20Add David Hashe to 'AUTHORS'.Andreas Enge 2015-02-02Add Deck to 'AUTHORS'.Ludovic Courtès 2015-01-24Add Ricardo to 'AUTHORS'.Ludovic Courtès 2014-12-09Add Tomáš to 'AUTHORS'.Ludovic Courtès 2014-11-18Add Julien to 'AUTHORS'.Ludovic Courtès 2014-11-14Add the name of Sou Bunnbu in its original script to 'AUTHORS'.Ludovic Courtès 2014-11-12Add Sun Bunnbu to 'AUTHORS'.Ludovic Courtès 2014-10-26Update name and email address for Joshua Grant.Joshua Grant 2014-10-08Add Federico to 'AUTHORS'.Ludovic Courtès 2014-09-10Add Marek to 'AUTHORS'.Ludovic Courtès 2014-08-15Update AUTHORS and THANKS.Ludovic Courtès 2014-07-18Update 'AUTHORS'....* AUTHORS: Correct the email address I use for Guix work. John Darrington 2014-07-15Add Jason to 'AUTHORS'.Ludovic Courtès 2014-06-29Add Cyrill to AUTHORS.Ludovic Courtès 2014-04-06Add Alírio to 'AUTHORS'.Ludovic Courtès 2014-02-16Add Manolis to 'AUTHORS'.Ludovic Courtès 2014-02-06Add Raimon to 'AUTHORS'.Ludovic Courtès 2014-01-24Add Sree to 'AUTHORS'.Ludovic Courtès 2013-11-29Update references from Guy's old namegzg 2013-11-26Add Guy to 'AUTHORS'.Ludovic Courtès 2013-11-24Add John to 'AUTHORS'.Ludovic Courtès 2013-10-16Update 'AUTHORS'.Ludovic Courtès 2013-10-14Thank Jeffrin and David.Ludovic Courtès 2013-10-06Update 'AUTHORS'....* AUTHORS: Add Alex, Joshua, and Aljosha. Ludovic Courtès 2013-02-17Add Mark to `AUTHORS'.Ludovic Courtès 2013-01-27Update `AUTHORS' and `THANKS'.Ludovic Courtès 2013-01-18Move Andreas to `AUTHORS'.Ludovic Courtès 2012-12-09Change email address in `AUTHORS'.Ludovic Courtès 2012-12-08Update `AUTHORS'.Ludovic Courtès (manifest-transaction-removal-candidate?): New procedure. * tests/profiles.scm ("manifest-transaction-removal-candidate?"): New test. Ludovic Courtès 2017-06-21profiles: Catch and report collisions in the profile....* guix/profiles.scm (&profile-collision-error): New error condition. (manifest-transitive-entries, manifest-entry-lookup, lower-manifest-entry) (check-for-collisions): New procedures. (profile-derivation): Add call to 'check-for-collisions'. * guix/ui.scm (call-with-error-handling): Handle '&profile-collision-error'. * tests/profiles.scm ("collision", "collision of propagated inputs") ("no collision"): New tests. Ludovic Courtès 2017-06-21profiles: Manifest entries keep a reference to their parent entry....* guix/profiles.scm (<manifest-entry>)[parent]: New field. (package->manifest-entry): Add #:parent parameter. Fill out the 'parent' field of <manifest-entry>; pass #:parent in recursive calls. * guix/profiles.scm (sexp->manifest)[sexp->manifest-entry]: New procedure. Use it for version 3. * tests/profiles.scm ("manifest-entry-parent"): New procedure. ("read-manifest")[entry->sexp]: Add 'manifest-entry-parent' to the result. Ludovic Courtès 2017-06-21profiles: Represent propagated inputs as manifest entries....* guix/profiles.scm (package->manifest-entry): Turn DEPS into a list of manifest entries. (manifest->gexp)[entry->gexp]: Call 'entry->gexp' on DEPS. Bump version to 3. (sexp->manifest)[infer-dependency]: New procedure. Use it for versions 1 and 2. Parse version 3. (manifest-inputs)[entry->gexp]: New procedure. Adjust to 'dependencies' being a list of <manifest-entry>. * tests/profiles.scm ("packages->manifest, propagated inputs") ("read-manifest"): New fields. Ludovic Courtès 2017-05-18union: Gracefully handle dangling symlinks in the input....Fixes <http://bugs.gnu.org/26949>. Reported by Pjotr Prins <pjotr.public12@thebird.nl>. * guix/build/union.scm (file-is-directory?): Return #f when FILE does not exist or is a dangling symlink. (file=?): Pass #f as a second argument to 'stat'; return #f when both ST1 or ST2 is #f. * tests/profiles.scm (test-equalm): New macro. ("union vs. dangling symlink"): New test. Ludovic Courtès 2017-03-17profiles: Packages in a profile can be cross-compiled....* guix/profiles.scm (profile-derivation): Add #:target parameter; pass it to 'gexp->derivation'. * tests/profiles.scm ("profile-derivation, cross-compilation"): New test. Ludovic Courtès