diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-04-19 16:49:09 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-04-19 23:34:53 +0200 |
commit | bbceb0ef8a1e05faaa15c5b4135275fb4572b8d9 (patch) | |
tree | 07b08a952584b1413678f856ba8d1e7ca48741d6 /tests | |
parent | 42f118010be14b761144efccae9bdeb33a3db212 (diff) | |
download | gnu-guix-bbceb0ef8a1e05faaa15c5b4135275fb4572b8d9.tar gnu-guix-bbceb0ef8a1e05faaa15c5b4135275fb4572b8d9.tar.gz |
packages: Add 'supported-package?'.
* guix/packages.scm (supported-package?): New procedure.
* tests/packages.scm ("supported-package?"): New test.
* build-aux/hydra/gnu-system.scm (package->job): Use it instead of
'package-transitive-supported-systems'.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/packages.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index 3007b50b92..91910324fe 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -166,6 +166,14 @@ `("does-not-exist" "foobar" ,@%supported-systems))))) (package-transitive-supported-systems p))) +(test-assert "supported-package?" + (let ((p (dummy-package "foo" + (build-system gnu-build-system) + (supported-systems '("x86_64-linux" "does-not-exist"))))) + (and (supported-package? p "x86_64-linux") + (not (supported-package? p "does-not-exist")) + (not (supported-package? p "i686-linux"))))) + (test-skip (if (not %store) 8 0)) (test-assert "package-source-derivation, file" |