aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2019 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 (test-scripts)
  #:use-module (guix scripts)
  #:use-module (guix tests)
  #:use-module ((guix scripts build)
                #:select (%standard-build-options))
  #:use-module (srfi srfi-64))

;; Test the (guix scripts) module.


(test-begin "scripts")

(test-equal "parse-command-line"
  '((argument . "bar") (argument . "foo")
    (cores . 10)                                  ;takes precedence
    (substitutes? . #f) (keep-failed? . #t)
    (max-jobs . 77) (cores . 42))

  (with-environment-variable "GUIX_BUILD_OPTIONS" "-c 42 -M 77"
    (parse-command-line '("--keep-failed" "--no-substitutes"
                          "--cores=10" "foo" "bar")
                        %standard-build-options
                        (list '()))))

(test-equal "parse-command-line and --no options"
  '((argument . "foo")
    (substitutes? . #f))                          ;takes precedence

  (with-environment-variable "GUIX_BUILD_OPTIONS" "--no-substitutes"
    (parse-command-line '("foo")
                        %standard-build-options
                        (list '((substitutes? . #t))))))

(test-end "scripts")

;;; Local Variables:
;;; eval: (put 'with-environment-variable 'scheme-indent-function 2)
;;; End:
cardo Wurmus 2019-04-08gnu: Add jsoncpp-for-tensorflow....Ricardo Wurmus 2019-04-08gnu: Add python-protobuf-next....Ricardo Wurmus 2019-04-08gnu: Add gemmlowp-for-tensorflow....Ricardo Wurmus 2019-04-08gnu: mu: Update to 1.2....Pierre Langlois 2019-04-08installer: Use 'append' and 'list' instead of 'cons*'....Ludovic Courtès 2019-04-08installer: Generate 'set-xorg-configuration' snippet....Ludovic Courtès 2019-04-08installer: Xfce service uses the 'service' form....Ludovic Courtès 2019-04-08gnu: mpv: Set absolute path to 'youtube-dl'....Timo Eisenmann 2019-04-08gnu: scalapack: Use 'non-copyleft' as the license....Ludovic Courtès 2019-04-08gnu: sbcl-trivial-backtrace: Fix 'license' field....Ludovic Courtès 2019-04-08gnu: guix: Update to d78bfd2....Ludovic Courtès 2019-04-08gnu: wireguard: Update to 0.0.20190406....Rutger Helling 2019-04-08gnu: linux-libre: Update to 5.0.7....Mark H Weaver 2019-04-08gnu: linux-libre@4.19: Update to 4.19.34....Mark H Weaver 2019-04-08gnu: linux-libre@4.14: Update to 4.14.111....Mark H Weaver 2019-04-08gnu: linux-libre@4.9: Update to 4.9.168....Mark H Weaver 2019-04-07gnu: openjpeg: Replace with 2.3.1 [security fixes]....Marius Bakke 2019-04-07gnu: miniupnpc: Update to 2.1.20190403....Marius Bakke 2019-04-07gnu: samba: Update to 4.10.1....Marius Bakke 2019-04-07gnu: ungoogled-chromium: Update to 73.0.3683.103-0.4c7fb6d....Marius Bakke 2019-04-07gnu: Add emacs-protobuf-mode....Carlo Zancanaro 2019-04-07gnu: Add emacs-erlang....Carlo Zancanaro 2019-04-07gnu: emacs-wgrep: Update to 2.3.0....Brian Leung 2019-04-07gnu: emacs-evil-matchit: Update to 2.2.9....Brian Leung 2019-04-07gnu: emacs-js2-mode: Update to 20190219....Brian Leung 2019-04-07gnu: emacs-exwm: Provide absolute file name in '.desktop' file....Diego Nicola Barbato 2019-04-07install: Tweak motd....Ludovic Courtès 2019-04-07install: Remove "GuixSD"....Ludovic Courtès 2019-04-07installer: Adjust welcome page message....Ludovic Courtès 2019-04-07installer: Internationalize service "names"....Ludovic Courtès 2019-04-07installer: Offer NM, Connman, and DHCP to non-desktop installs....Ludovic Courtès 2019-04-07gnu: Add clp....Ricardo Wurmus 2019-04-07gnu: guitarix: Update to 0.38.0....Ricardo Wurmus 2019-04-07gnu: lcms: Fix CVE-2018-16435....Efraim Flashner 2019-04-07gnu: libssh2@1.8.0: Move to ssh.scm....Ludovic Courtès 2019-04-07services: dropbear: Add default value....Ludovic Courtès 2019-04-07installer: Add dialog to select networking services....Ludovic Courtès 2019-04-07installer: Generalize desktop environments to system services....Ludovic Courtès 2019-04-07installer: Remove SLiM-specific instructions....Ludovic Courtès 2019-04-07installer: Fix wording for "Internet access."...Ludovic Courtès 2019-04-07installer: Use the normalized codeset in the 'locale' field....Ludovic Courtès