diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-06-14 21:26:22 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-06-14 21:57:39 +0200 |
commit | 03d76577b96ba81c9921eb3a297d42db8644280b (patch) | |
tree | 8814bcef3f082a98f853ca7bacf02a552a76a1d2 /tests/guix-environment.sh | |
parent | 11b4a8716c65e8fe21e5975e764b3e14dbd8dcc4 (diff) | |
download | guix-03d76577b96ba81c9921eb3a297d42db8644280b.tar guix-03d76577b96ba81c9921eb3a297d42db8644280b.tar.gz |
tests: Make builds less expensive.
The switch to the reduced bootstrap broke build time assumptions made by
tests, notably the assumption that GNU-MAKE-BOOT0 was cheap to build.
This commit adjusts this to make these tests cheaper.
* gnu/packages/bootstrap.scm (%bootstrap-inputs-for-tests): New variable.
* guix/tests.scm (gnu-make-for-tests): New variable.
* tests/guix-environment.sh: Use GNU-MAKE-FOR-TESTS instead of
GNU-MAKE-BOOT0. Remove test with FINDUTILS-BOOT0.
* tests/guix-package-net.sh (boot_make): Use GNU-MAKE-FOR-TESTS.
* tests/packages.scm ("GNU Make, bootstrap"): Likewise.
* tests/profiles.scm ("profile-derivation relative symlinks, two entries"):
Likewise.
* tests/union.scm (%bootstrap-inputs): Remove.
("union-build"): Use %BOOTSTRAP-INPUTS-FOR-TESTS instead of
%BOOTSTRAP-INPUTS.
Diffstat (limited to 'tests/guix-environment.sh')
-rw-r--r-- | tests/guix-environment.sh | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh index a670db36be..fb1c1a022d 100644 --- a/tests/guix-environment.sh +++ b/tests/guix-environment.sh @@ -156,7 +156,7 @@ if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null then # Compute the build environment for the initial GNU Make. guix environment --bootstrap --no-substitutes --search-paths --pure \ - -e '(@@ (gnu packages commencement) gnu-make-boot0)' > "$tmpdir/a" + -e '(@ (guix tests) gnu-make-for-tests)' > "$tmpdir/a" # Make sure bootstrap binaries are in the profile. profile=`grep "^export PATH" "$tmpdir/a" | sed -r 's|^.*="(.*)/bin"|\1|'` @@ -177,30 +177,15 @@ then # Make sure that the shell spawned with '--exec' sees the same environment # as returned by '--search-paths'. guix environment --bootstrap --no-substitutes --pure \ - -e '(@@ (gnu packages commencement) gnu-make-boot0)' \ + -e '(@ (guix tests) gnu-make-for-tests)' \ -- /bin/sh -c 'echo $PATH $CPATH $LIBRARY_PATH' > "$tmpdir/b" ( . "$tmpdir/a" ; echo $PATH $CPATH $LIBRARY_PATH ) > "$tmpdir/c" cmp "$tmpdir/b" "$tmpdir/c" rm "$tmpdir"/* - # Compute the build environment for the initial GNU Findutils. - guix environment --bootstrap --no-substitutes --search-paths --pure \ - -e '(@@ (gnu packages commencement) findutils-boot0)' > "$tmpdir/a" - profile=`grep "^export PATH" "$tmpdir/a" | sed -r 's|^.*="(.*)/bin"|\1|'` - - # Make sure the bootstrap binaries are all listed where they belong. - grep -E "^export PATH=\"$profile/bin\"" "$tmpdir/a" - grep -E "^export CPATH=\"$profile/include\"" "$tmpdir/a" - grep -E "^export LIBRARY_PATH=\"$profile/lib\"" "$tmpdir/a" - for dep in bootstrap-binaries-0 gcc-bootstrap-0 glibc-bootstrap-0 \ - make-boot0 - do - guix gc --references "$profile" | grep "$dep" - done - # The following test assumes 'make-boot0' has a "debug" output. - make_boot0_debug="`guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)' | grep -e -debug`" + make_boot0_debug="`guix build -e '(@ (guix tests) gnu-make-for-tests)' | grep -e -debug`" test "x$make_boot0_debug" != "x" # Make sure the "debug" output is not listed. @@ -210,7 +195,7 @@ then # Compute the build environment for the initial GNU Make, but add in the # bootstrap Guile as an ad-hoc addition. guix environment --bootstrap --no-substitutes --search-paths --pure \ - -e '(@@ (gnu packages commencement) gnu-make-boot0)' \ + -e '(@ (guix tests) gnu-make-for-tests)' \ --ad-hoc guile-bootstrap > "$tmpdir/a" profile=`grep "^export PATH" "$tmpdir/a" | sed -r 's|^.*="(.*)/bin"|\1|'` @@ -227,14 +212,14 @@ then # Make sure a package list with plain package objects and package+output # tuples can be used with -e. expr_list_test_code=" -(list (@@ (gnu packages commencement) gnu-make-boot0) +(list (@ (guix tests) gnu-make-for-tests) (list (@ (gnu packages bootstrap) %bootstrap-guile) \"out\"))" guix environment --bootstrap --ad-hoc --no-substitutes --search-paths \ --pure -e "$expr_list_test_code" > "$tmpdir/a" profile=`grep "^export PATH" "$tmpdir/a" | sed -r 's|^.*="(.*)/bin"|\1|'` - for dep in make-boot0 guile-bootstrap + for dep in make-test-boot0 guile-bootstrap do guix gc --references "$profile" | grep "$dep" done |