1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00
Files
guix/build-aux
Tomas Volf 18ea608fcf build: test-driver.scm: Utilize test-runner-group-path.
Test groups were not used in any meaningful way.  The group path was not
printed and it was not used in test selection mechanism.  I think groups are
useful, and it is nice to be able to, for example, run tests from a single
group.

This commit does two things.  First, it changes the test reporting to include
the value returned from test-runner-group-path, so you will know not only the
test name, but the test group(s) as well.  And second, it changes the test
selection (and exclusion) process to match against the "full" test name, so
group path + test name.

Hence

    (test-begin "failing tests")
    (test-equal "this should fail" 1 2)
    (test-end)

will, depending on the output location, produce following text.

.trs:

    :test-result: FAIL failing tests: this should fail [0.000s]
    :test-global-result: FAIL
    :recheck: yes
    :copy-in-global-log: yes

.log:

    test-name: failing tests: this should fail
    location: test.scm:140
    source:
    + (test-equal "this should fail" 1 2)
    expected-value: 1
    actual-value: 2
    result: FAIL

stdout:

    FAIL: test.scm - failing tests: this should fail [0.000s]

* build-aux/test-driver.scm (current-test-full-name): New procedure.
(test-runner-gnu): Use current-test-full-name instead of
test-runner-test-name.
(test-match-name*): Match against current-test-full-name.  Use compose.
(test-match-name*/negated): Rewrite in terms of test-match-name*.

Change-Id: I3fb9a2a721165204f020b79e019533f799b790e4
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
Modified-by: Maxim Cournoyer <maxim@guixotic.coop>
2026-03-20 17:38:15 +09:00
..