tests: Remove duplicate field initializers.
Fixes a regression introduced inc2dcff41c2
, whereby many tests in 'tests/packages.scm' would trigger a syntax error due to duplicate field intializers in forms like: (dummy-package "foo" (version "0")) * guix/tests.scm (dummy-package, dummy-origin): Rewrite to inherit from a base record. This restores the semantics from beforec2dcff41c2
. * tests/services.scm ("instantiate-missing-services, indirect"): Remove duplicate 'extensions' field.
This commit is contained in:
parent
f1618a0f2f
commit
2c5ee9bba4
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -334,18 +334,19 @@ CONTENTS."
|
||||||
(define-syntax-rule (dummy-package name* extra-fields ...)
|
(define-syntax-rule (dummy-package name* extra-fields ...)
|
||||||
"Return a \"dummy\" package called NAME*, with all its compulsory fields
|
"Return a \"dummy\" package called NAME*, with all its compulsory fields
|
||||||
initialized with default values, and with EXTRA-FIELDS set as specified."
|
initialized with default values, and with EXTRA-FIELDS set as specified."
|
||||||
(package extra-fields ...
|
(let ((p (package
|
||||||
(name name*) (version "0") (source #f)
|
(name name*) (version "0") (source #f)
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(synopsis #f) (description #f)
|
(synopsis #f) (description #f)
|
||||||
(home-page #f) (license #f)))
|
(home-page #f) (license #f))))
|
||||||
|
(package (inherit p) extra-fields ...)))
|
||||||
|
|
||||||
(define-syntax-rule (dummy-origin extra-fields ...)
|
(define-syntax-rule (dummy-origin extra-fields ...)
|
||||||
"Return a \"dummy\" origin, with all its compulsory fields initialized with
|
"Return a \"dummy\" origin, with all its compulsory fields initialized with
|
||||||
default values, and with EXTRA-FIELDS set as specified."
|
default values, and with EXTRA-FIELDS set as specified."
|
||||||
(origin extra-fields ...
|
(let ((o (origin (method #f) (uri "http://www.example.com")
|
||||||
(method #f) (uri "http://www.example.com")
|
(sha256 (base32 (make-string 52 #\x))))))
|
||||||
(sha256 (base32 (make-string 52 #\x)))))
|
(origin (inherit o) extra-fields ...)))
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1)
|
;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
(default-value 'dflt)
|
(default-value 'dflt)
|
||||||
(compose concatenate)
|
(compose concatenate)
|
||||||
(extend cons)))
|
(extend cons)))
|
||||||
(t2 (service-type (name 't2) (extensions '())
|
(t2 (service-type (name 't2)
|
||||||
(default-value 'dflt2)
|
(default-value 'dflt2)
|
||||||
(compose concatenate)
|
(compose concatenate)
|
||||||
(extend cons)
|
(extend cons)
|
||||||
|
|
Loading…
Reference in New Issue