Skip to content

Support for running tests outside t/ + don't run a TODO test

Ævar Arnfjörð Bjarmason git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest4 patches 0 repliesNew

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and ../t/test-lib.sh+8 -80 replies
2/4test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../t/test-lib.sh+15 -140 replies
3/4test-lib: Allow overriding of TEST_DIRECTORYt/test-lib.sh+7 -10 replies
4/4t/t0000-basic.sh: Run the passing TODO test inside its own test-libt/t0000-basic.sh+31 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/4] Support for running tests outside t/ + don't run a TODO test
Quoted 10 lines · Junio C Hamano
Quoted 7 lines · Sverre Rabbelier

E.g., something like:

test_in_new_harness 0 1 0 0 '

    test_expect_failure 'pretend we have fixed a known breakage' '
           :
     '

'

Quoted 4 lines

Now the question becomes who tests "test_in_new_harness" ;-)

I'd rather prefer not to touch this one. Isn't whatever the outer wrapper used flexible enough to be taught about this kind of thing and filter it?

The problem is that you have to modify *all* the outer wrappers. Since the test suite can be run with any TAP consumer that isn't viable, and at the very least having to do:

prove --source=Some::Custom::Git Thing ...

Is tedious, and requires us to maintain the Some::Custom::Git thingy.

Anyway, here's a better patch. It allows us to run a pasing TODO test, check if it works, and if so not mark *that* test as passing TODO, but simply as passing.

As a side benefit it makes the test lib more awesome.

Ævar Arnfjörð Bjarmason (4):
test-lib: Use $TEST_DIRECTORY or $GIT_BUILD_DIR instead of $(pwd) and

    ../

test-lib: Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY"/../
test-lib: Allow overriding of TEST_DIRECTORY t/t0000-basic.sh: Run the passing TODO test inside its own test-lib

 t/t0000-basic.sh |   31 +++++++++++++++++++++++++++++++
 t/test-lib.sh    |   39 +++++++++++++++++++++++----------------
 2 files changed, 54 insertions(+), 16 deletions(-)
Signature · 1 line
1.7.2.1.414.g9bf49