aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts.scm
blob: 0315642f3848b7c735ada30f17968e1fbc63cb3f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;;; 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:
de4'>Merge branch 'master' into stagingMarius Bakke 2018-08-14gnu: gdm: Fix CVE-2018-14424....Leo Famulari 2018-08-10gnu: libsoup: Update to 2.62.3....Marius Bakke 2018-08-10Merge branch 'master' into stagingMarius Bakke 2018-08-09gnu: gusb: Update to 0.3.0....Marius Bakke 2018-08-08gnu: epiphany: Correctly set the library RUNPATH....Leo Famulari 2018-08-07Merge branch 'master' into stagingMarius Bakke 2018-08-01gnu: upower: Add explicit dependency on Glib....Marius Bakke 2018-08-01gnu: upower: Update to 0.99.8....Marius Bakke 2018-07-28Merge branch 'master' into stagingMarius Bakke 2018-07-28gnu: dconf: Update to 0.28.0....Marius Bakke 2018-07-28gnu: dconf: Update license....Marius Bakke 2018-07-28gnu: dconf: Install GTK documentation....Marius Bakke 2018-07-28gnu: dconf: Adjust inputs and remove obsolete workaround....Marius Bakke 2018-07-22gnu: libgsf: Update to 1.14.43.Marius Bakke 2018-07-13gnu: faba-icon-theme: Fix build....Julien Lepiller 2018-07-13Merge branch 'staging'Marius Bakke 2018-07-13gnu: faba-icon-theme: Switch to meson-build-system....Vasile Dumitrascu 2018-07-13gnu: faba-icon-theme: Update to 4.3....Vasile Dumitrascu 2018-07-13gnu: moka-icon-theme: Update to 5.4.0....Vasile Dumitrascu 2018-07-09gnu: vte-ng: Update to 0.52.2.a....Marius Bakke 2018-07-09gnu: vte-ng: Use "invoke"....Marius Bakke 2018-07-09gnu: gnome-dictionary: Fix install phase....Marius Bakke 2018-07-04gnu: clutter-gtk: Update to 1.8.4....Tobias Geerinckx-Rice 2018-07-04gnu: totem: Update to 3.26.1....Tobias Geerinckx-Rice 2018-06-25gnu: epiphany: Update to 3.28.3.1 [fixes CVE-2018-{11396,12016}]....Mark H Weaver 2018-06-22gnu: workrave: Edit description....Tobias Geerinckx-Rice 2018-06-22gnu: gnome-dictionary: Update to 3.26.1....Ludovic Courtès 2018-06-20Fix some more lonely unquotes....Tobias Geerinckx-Rice 2018-06-19gnu: arc-icon-theme: Fix build....Julien Lepiller 2018-06-19gnu: faba-icon-theme: Fix build....Julien Lepiller 2018-06-13gnu: cheese: Update to 3.28.0....Rutger Helling 2018-06-09gnu: rhythmbox: Add a unreleased patch from upstream....Christopher Baines 2018-06-06Merge branch 'master' into core-updatesRicardo Wurmus 2018-06-06gnu: epiphany: Update to 3.28.2.1....Rutger Helling