Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speeding up 'make check' #113

Merged
merged 2 commits into from
Nov 23, 2024

Conversation

civodul
Copy link
Collaborator

@civodul civodul commented Nov 17, 2024

This change ensures make check runs in a timely fashion, particularly in Guix build environments.

Why Guix? Because the default $HOME in build environments in not writable, meaning that tests were not auto-compiled, and thus loop-to-1e4 and similar would take much longer (especially on low-end AArch64 or RISC-V machines where it would typically time out after an hour).

env.in Outdated Show resolved Hide resolved
Copy link
Collaborator

@emixa-d emixa-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(The TMPDIR issue is particularly important)

@civodul civodul force-pushed the make-check-skips-benchmark-by-default branch 2 times, most recently from 45fa498 to 916fab1 Compare November 17, 2024 21:40
With this change, ‘make check’ runs in 230s on x86_64-linux-gnu (4-core
CPU) instead of 880s.

* tests/speedup.scm <top level>: Exit with 77 when
‘FIBERS_EXPENSIVE_TESTS’ is unset.
With this change, tests run in 87s 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.
* Makefile.am (TESTS_ENVIRONMENT): Pass ‘--no-auto-compile’.
* tests/basic.scm (%long-loop-iterations): New variable.
(loop-to-1e4): Rename to…
(loop-long-enough): … this.  Refer to ‘%long-loop-iterations’.
* guix.scm (guile-fibers)[arguments]: Remove.
* tests/speedup.scm: Divide by 10 the number of iterations.
@civodul civodul force-pushed the make-check-skips-benchmark-by-default branch from 916fab1 to 3327e76 Compare November 23, 2024 10:20
@civodul
Copy link
Collaborator Author

civodul commented Nov 23, 2024

I did try to compile tests since that's apparently how they were calibrated but it's not doable: the last attempt failed because guile -s ../../tests/basic.scm (or similar) looks for ../../tests/basic.scm.go (in the source directory), which is why make distcheck was failing.

So I did the basic thing (same as every other project I've worked with): run tests interpreted and recalibrate the loops so they don't run for ages.

@civodul civodul merged commit c295960 into wingo:master Nov 23, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants