Thread (39 messages) flat view 39 messages, 3 authors, 2021-09-22
STALE1828d

Revision v1 of 4 in this series.

Revisions (4)
  1. v1 current
  2. v2 [diff vs current]
  3. v3 [diff vs current]
  4. v4 [diff vs current]

[PATCH 0/8] test-lib tests: split off subtest code in t0000 into lib-subtest.sh

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-06-14 10:53:28

This refactors the testing of test-lib.sh itself in t0000 into a
lib-subtest.sh, fixing duplicate setup, bugs and various shell nits
along the way.

This was waiting on my now-merged 2019256717d (Merge branch
'ab/test-lib-updates', 2021-06-14).

There's a conflict here with Felipe's proposed
http://lore.kernel.org/git/20210609170520.67014-1-felipe.contreras@gmail.com (local),
but it's just a matter of moving the fix around and solving a trivial
conflict. I thought it was better to submit this now anyway, while
this code is fresh in people's minds.

I'm hoping Felipe will take some variant of my
http://lore.kernel.org/git/8735tk22if.fsf@evledraar.gmail.com (local) and
perhaps review this series & base his patch on top of these changes,
but alternatively they can go in independently with Junio solving the
conflict.

Ævar Arnfjörð Bjarmason (8):
  test-lib tests: move "run_sub_test" to a new lib-subtest.sh
  test-lib tests: split up "write and run" into two functions
  test-lib tests: stop using a subshell in write_sub_test_lib_test()
  test-lib tests: don't provide a description for the sub-tests
  test-lib tests: get rid of copy/pasted mock test code
  test-lib tests: avoid subshell for "test_cmp" for readability
  test-lib tests: refactor common part of check_sub_test_lib_test*()
  test-lib tests: assert 1 exit code, not non-zero

 t/lib-subtest.sh | 105 ++++++++++++
 t/t0000-basic.sh | 419 +++++++++++++----------------------------------
 2 files changed, 219 insertions(+), 305 deletions(-)
 create mode 100644 t/lib-subtest.sh

-- 
2.32.0.rc3.434.gd8aed1f08a7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help