mbox series

[bug#74394,0/2] Skip slow tests by default and run 'check' in Git pre-push hook.

Message ID cover.1731844485.git.maxim.cournoyer@gmail.com
Headers show
Series Skip slow tests by default and run 'check' in Git pre-push hook. | expand

Message

Maxim Cournoyer Nov. 17, 2024, 12:03 p.m. UTC
Hello,

This is a simple change that should ensure test suite breakages are detected
as early as possible and avoid tests breaking changes to be pushed.  This is
made possible by skipping a few expensive tests suite, bringing down the total
test time to about 1 minute on a fast machine.

We could call it a "distributed CI" approach ;-).

Note: I initially pursued an Automake or Make-based approach, but it ended up
far from trivial, hitting old issues such as [0] along the way.  This solution
simply puts the skip logic in the tests that must be skipped (a one liner).

To run the complete test suite including the slow tests (as is the case prior
this change):

make check WITH_SLOW_TESTS=1

[0]  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74387

Maxim Cournoyer (2):
  build: Exclude expensive tests in check target by default.
  etc: Ensure test suite passes in pre-push git hook.

 Makefile.am                | 9 ++++++++-
 etc/git/pre-push           | 1 +
 tests/guix-home.sh         | 5 +++++
 tests/guix-package.sh      | 5 +++++
 tests/guix-system.sh       | 4 ++++
 tests/guix-time-machine.sh | 4 +++-
 6 files changed, 26 insertions(+), 2 deletions(-)


base-commit: 94133452aa49de672d69950b2e1a99432111074c