summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Buddelmeijer <hugo@buddelmeijer.nl>2026-06-19 23:40:17 +0200
committerLudovic Courtès <ludo@gnu.org>2026-07-11 00:20:20 +0200
commitd7234541055f0bc99d00b060a0f073d5c834d2d0 (patch)
treeb45258201deca7775449f2f69b93a42c498b8c5d
parentaa641a7175bc6eba1e1c6472884245d2f2557967 (diff)
doc: Improve instructions to minimize unexpected test failures.
* doc/contributing.texi (Building from Git): Suggest `guix shell --pure` as that is currenlty the only way to make the tests pass on the first run. (Running the Test Suite): Explain which test failures are expected depending on each setup. Change-Id: I3425879dcd2a71c2e3c2fd00b55c819447ac9437 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Modified-by: Ludovic Courtès <ludo@gnu.org> Merges: #9408
-rw-r--r--doc/contributing.texi49
1 files changed, 32 insertions, 17 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi
index 95ba08c508c..576aee8a816 100644
--- a/doc/contributing.texi
+++ b/doc/contributing.texi
@@ -175,24 +175,16 @@ all the dependencies and appropriate environment variables are set up to
175hack on Guix: 175hack on Guix:
176 176
177@example 177@example
178guix shell -D guix -CPW 178guix shell -D guix --pure
179@end example 179@end example
180 180
181or even, from within a Git worktree for Guix: 181or even, from within a Git worktree for Guix:
182 182
183@example 183@example
184echo $(pwd) >> ~/.config/guix/shell-authorized-directories 184echo $(pwd) >> ~/.config/guix/shell-authorized-directories
185guix shell -CPW 185guix shell --pure
186@end example 186@end example
187 187
188If @option{-C} (short for @option{--container}) is not supported on your
189system, try @command{--pure} instead of @option{-CPW}.
190@xref{Invoking guix shell}, for more information on that command.
191
192Most of the test suite runs without an internet connection. The @option{-N}
193(short for @option{--network}) can be added to the @code{guix shell} command
194to run the tests that require internet access.
195
196If you are unable to use Guix when building Guix from a checkout, the 188If you are unable to use Guix when building Guix from a checkout, the
197following are the required packages in addition to those mentioned in the 189following are the required packages in addition to those mentioned in the
198installation instructions (@pxref{Requirements}). 190installation instructions (@pxref{Requirements}).
@@ -210,7 +202,7 @@ On Guix, other development tools, like @code{strace}, can be included by
210giving them as extra arguments to @command{guix shell}: 202giving them as extra arguments to @command{guix shell}:
211 203
212@example 204@example
213guix shell -D guix -CPW strace 205guix shell --pure -D guix strace
214@end example 206@end example
215 207
216From there you can generate the build system infrastructure 208From there you can generate the build system infrastructure
@@ -261,18 +253,14 @@ right @code{localstatedir} and @code{sysconfdir} values, which get
261recorded in the @code{(guix config)} Guile module. 253recorded in the @code{(guix config)} Guile module.
262 254
263Finally, you can build Guix and, if you feel so inclined, run the tests 255Finally, you can build Guix and, if you feel so inclined, run the tests
264(@pxref{Running the Test Suite}): 256(depending on how you setup your environment, some tests might fail,
257@pxref{Running the Test Suite}):
265 258
266@example 259@example
267make 260make
268make check 261make check
269@end example 262@end example
270 263
271@noindent
272If anything fails, take a look at installation instructions
273(@pxref{Installation}) or send a message to the
274@email{guix-devel@@gnu.org, mailing list}.
275
276From there on, you can authenticate all the commits included in your 264From there on, you can authenticate all the commits included in your
277checkout by running: 265checkout by running:
278 266
@@ -345,6 +333,33 @@ suite, type:
345make check 333make check
346@end example 334@end example
347 335
336Some tests might fail or be skipped, depending on your environment.
337For example, many tests require Internet access to download test
338binaries into the temporary store used for testing.
339
340Assuming you set up your environment with @command{guix shell},
341this is what you can expect:
342
343@table @option
344@item --pure
345all tests should either pass or be skipped. This will also
346set up the test store;
347@item -CPWN
348all tests should either pass or be skipped and this should
349also set up the test store@footnote{At the time of writing, June 2026,
350some tests might fail in a @option{-CPWN} shell; those are
351@url{https://codeberg.org/guix/guix/issues/9381, bugs}.};
352@item -CPW
353all network tests should automatically be skipped, but tests
354that require the test store are run, so those will fail unless the test store
355has been set up during an earlier test run with network access.
356@end table
357
358@quotation Note
359Some tests are skipped for other reasons, for example because they are
360only applicable for a specific system.
361@end quotation
362
348Test cases can run in parallel: you can use the @code{-j} option of 363Test cases can run in parallel: you can use the @code{-j} option of
349GNU@tie{}make to speed things up. The first run may take a few minutes 364GNU@tie{}make to speed things up. The first run may take a few minutes
350on a recent machine; subsequent runs will be faster because the store 365on a recent machine; subsequent runs will be faster because the store