summary refs log tree commit diff
path: root/tests/guix-build.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-19 15:18:20 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-19 17:46:40 +0200
commitea261dea0c581771b4cf297e983f7addc6807051 (patch)
tree022306c8d977f2ad5e0002d5f1a7b7a67349fb19 /tests/guix-build.sh
parent296da6e624633f4e049244e72647ceff535a6cc0 (diff)
downloadguix-ea261dea0c581771b4cf297e983f7addc6807051.tar.gz
guix build: Accept multiple '-s' options.
* guix/scripts/build.scm (%default-options): Remove 'system'.
(%options) <--system>: Keep previous occurrences of 'system in RESULT.
(options->derivations)[system]: Remove.
[systems, things-to-build]: New variables.
[compute-derivation]: New procedure.
Iterate on all of SYSTEMS to compute the derivations of THINGS-TO-BUILD.
* tests/guix-build.sh: Add test for one and multiple '-s' flags.
* doc/guix.texi (Additional Build Options): Document this behavior.
Diffstat (limited to 'tests/guix-build.sh')
-rw-r--r--tests/guix-build.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index d479296ef1..63a9fe68da 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -44,6 +44,13 @@ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'
      guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)';	\
   then exit 1; fi )
 
+# Passing one '-s' flag.
+test `guix build sed -s x86_64-linux -d | wc -l` = 1
+
+# Passing multiple '-s' flags.
+all_systems="-s x86_64-linux -s i686-linux -s armhf-linux -s aarch64-linux"
+test `guix build sed $all_systems -d | sort -u | wc -l` = 4
+
 # Check --sources option with its arguments
 module_dir="t-guix-build-$$"
 mkdir "$module_dir"