summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--guix/tests.scm12
-rw-r--r--tests/lint.scm7
-rw-r--r--tests/packages.scm7
3 files changed, 12 insertions, 14 deletions
diff --git a/guix/tests.scm b/guix/tests.scm
index 022679902a..82ae7e2084 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -27,7 +27,8 @@
   #:export (open-connection-for-tests
             random-text
             random-bytevector
-            with-derivation-narinfo))
+            with-derivation-narinfo
+            dummy-package))
 
 ;;; Commentary:
 ;;;
@@ -120,6 +121,15 @@ substituter's viewpoint."
     (lambda ()
       body ...)))
 
+(define-syntax-rule (dummy-package name* extra-fields ...)
+  "Return a \"dummy\" package called NAME*, with all its compulsory fields
+initialized with default values, and with EXTRA-FIELDS set as specified."
+  (package extra-fields ...
+           (name name*) (version "0") (source #f)
+           (build-system gnu-build-system)
+           (synopsis #f) (description #f)
+           (home-page #f) (license #f)))
+
 ;; Local Variables:
 ;; eval: (put 'call-with-derivation-narinfo 'scheme-indent-function 1)
 ;; End:
diff --git a/tests/lint.scm b/tests/lint.scm
index 8ae129d9fe..e7e548b626 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -19,6 +19,7 @@
 
 
 (define-module (test-packages)
+  #:use-module (guix tests)
   #:use-module (guix build download)
   #:use-module (guix build-system gnu)
   #:use-module (guix packages)
@@ -105,12 +106,6 @@ requests."
 
 (test-begin "lint")
 
-(define-syntax-rule (dummy-package name* extra-fields ...)
-  (package extra-fields ... (name name*) (version "0") (source #f)
-           (build-system gnu-build-system)
-           (synopsis #f) (description #f)
-           (home-page #f) (license #f) ))
-
 (define (call-with-warnings thunk)
   (let ((port (open-output-string)))
     (parameterize ((guix-warning-port port))
diff --git a/tests/packages.scm b/tests/packages.scm
index 98fa9b5698..f7d6155ecc 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -48,13 +48,6 @@
 (define %store
   (open-connection-for-tests))
 
-(define-syntax-rule (dummy-package name* extra-fields ...)
-  (package (name name*) (version "0") (source #f)
-           (build-system gnu-build-system)
-           (synopsis #f) (description #f)
-           (home-page #f) (license #f)
-           extra-fields ...))
-
 
 (test-begin "packages")