diff options
author | Marius Bakke <marius@gnu.org> | 2020-12-29 17:37:17 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-12-29 17:37:17 +0100 |
commit | a22e75c073c785a3a71c952d97fb7ab87dfd282d (patch) | |
tree | c0ef12b8c271c9de37bcce9287b67adf8628ed93 /tests/transformations.scm | |
parent | bbe4ed65ed5fe7dc8ed9d226042852387cee3b1e (diff) | |
parent | 789bf7fcc241d010cb583dc76c366110bfca8b35 (diff) | |
download | guix-a22e75c073c785a3a71c952d97fb7ab87dfd282d.tar.gz |
Merge branch 'master' into ungrafting
Diffstat (limited to 'tests/transformations.scm')
-rw-r--r-- | tests/transformations.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/transformations.scm b/tests/transformations.scm index 2d33bed7ae..9053deba41 100644 --- a/tests/transformations.scm +++ b/tests/transformations.scm @@ -26,6 +26,7 @@ #:use-module (guix build-system) #:use-module (guix build-system gnu) #:use-module (guix transformations) + #:use-module ((guix gexp) #:select (local-file? local-file-file)) #:use-module (guix ui) #:use-module (guix utils) #:use-module (guix git) @@ -372,6 +373,29 @@ (match (memq #:tests? (package-arguments tar)) ((#:tests? #f _ ...) #t)))))))) +(test-equal "options->transformation, with-patch" + (search-patches "glibc-locales.patch" "guile-relocatable.patch") + (let* ((dep (dummy-package "dep" + (source (dummy-origin)))) + (p (dummy-package "foo" + (inputs `(("dep" ,dep))))) + (patch1 (search-patch "glibc-locales.patch")) + (patch2 (search-patch "guile-relocatable.patch")) + (t (options->transformation + `((with-patch . ,(string-append "dep=" patch1)) + (with-patch . ,(string-append "dep=" patch2)) + (with-patch . ,(string-append "tar=" patch1)))))) + (let ((new (t p))) + (match (bag-direct-inputs (package->bag new)) + ((("dep" dep) ("tar" tar) _ ...) + (and (member patch1 + (filter-map (lambda (patch) + (and (local-file? patch) + (local-file-file patch))) + (origin-patches (package-source tar)))) + (map local-file-file + (origin-patches (package-source dep))))))))) + (test-end) ;;; Local Variables: |