Skip to content

Commit

Permalink
build: Auto-compile tests.
Browse files Browse the repository at this point in the history
With this change, tests run in 46s instead of 230s on my x86_64 laptop
when using ‘guix build -f guix.scm’.

* build-aux/guile.am (.scm.go): Set GUILE_AUTO_COMPILE=0.
* env.in: Set ‘XDG_CACHE_HOME’ when it’s undefined.
* guix.scm (guile-fibers)[arguments]: Remove.
  • Loading branch information
civodul committed Nov 17, 2024
1 parent 1237050 commit 89ee033
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build-aux/guile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
SUFFIXES = .scm .go
.scm.go:
$(AM_V_GEN) $(top_builddir)/env \
$(AM_V_GEN) GUILE_AUTO_COMPILE=0 $(top_builddir)/env \
$(GUILE_TOOLS) compile $(GUILE_TARGET) -L "$(abs_top_srcdir)" \
$(GUILE_WARNINGS) -o "$@" "$<"
8 changes: 8 additions & 0 deletions env.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ else
PATH="@abs_top_srcdir@/bin":$PATH
fi

# Tests are calibrated to be compiled (they're much slower when
# interpreted) so make sure they can be auto-compiled upon 'make
# check'.
if test "$XDG_CACHE_HOME" = ""; then
XDG_CACHE_HOME="${TMPDIR:-/tmp}/guile-fibers-cache"
export XDG_CACHE_HOME
fi

FIBERS_BUILD_DIR=@abs_top_builddir@

export GUILE_LOAD_PATH
Expand Down
8 changes: 0 additions & 8 deletions guix.scm
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
"texinfo" "gettext-minimal"))))
(inputs
(list (S "guile")))
(arguments
`(#:phases (modify-phases %standard-phases
(add-before 'configure 'bootstrap
(lambda _
(zero? (system* "./autogen.sh"))))
(add-before 'configure 'setenv
(lambda _
(setenv "GUILE_AUTO_COMPILE" "0"))))))
(synopsis "Lightweight concurrency facility for Guile")
(description
"Fibers is a Guile library that implements a a lightweight concurrency
Expand Down

0 comments on commit 89ee033

Please sign in to comment.