mbox series

[00/15] t: replace incorrect test_must_fail usage (part 1)

Message ID cover.1576583819.git.liu.denton@gmail.com (mailing list archive)
Headers show
Series t: replace incorrect test_must_fail usage (part 1) | expand

Message

Denton Liu Dec. 17, 2019, 12:01 p.m. UTC
The overall scope of these patches is to replace inappropriate uses of
test_must_fail. IOW, we should only allow test_must_fail to run on `git`
and `test-tool`. Ultimately, we will conclude by making test_must_fail
error out on non-git commands. An advance view of the final series can
be found here[1].

This is the first part. It focuses on t[01]*.sh and also t/lib-git-p4.

[1]: (may be rebased at any time) https://github.com/Denton-L/git/tree/ready/cleanup-test-must-fail2

Denton Liu (15):
  test-lib-functions: introduce test_non_git_might_fail()
  t/lib-git-p4: use test_path_is_missing()
  t0000: replace test_must_fail with ! for run_sub_test_lib_test()
  t0003: use named parameters in attr_check()
  t0003: use test_must_be_empty()
  t0003: don't use `test_must_fail attr_check`
  t0020: drop redirections to /dev/null
  t0020: s/test_must_fail has_cr/! has_cr/
  t0020: use ! check_packed_refs_marked
  t1306: convert `test_might_fail rm` to `rm -f`
  t1307: reorder `nongit test_must_fail`
  t1409: let sed open its own files
  t1409: use test_path_is_missing()
  t1501: remove use of `test_might_fail cp`
  t1507: teach full_name() to accept `!` arg

 t/lib-git-p4.sh               |  2 +-
 t/t0000-basic.sh              | 14 +++++-----
 t/t0003-attributes.sh         | 51 ++++++++++++++++++-----------------
 t/t0020-crlf.sh               | 20 +++++++-------
 t/t1306-xdg-files.sh          |  8 +++---
 t/t1307-config-blob.sh        |  2 +-
 t/t1409-avoid-packing-refs.sh | 16 +++++------
 t/t1501-work-tree.sh          |  2 +-
 t/t1507-rev-parse-upstream.sh | 14 +++++++---
 t/test-lib-functions.sh       |  9 +++++++
 10 files changed, 77 insertions(+), 61 deletions(-)

Comments

Junio C Hamano Dec. 17, 2019, 6:28 p.m. UTC | #1
Denton Liu <liu.denton@gmail.com> writes:

> The overall scope of these patches is to replace inappropriate uses of
> test_must_fail. IOW, we should only allow test_must_fail to run on `git`
> and `test-tool`. Ultimately, we will conclude by making test_must_fail
> error out on non-git commands. An advance view of the final series can
> be found here[1].

Wow.  It is a bit sad to see that we had so many of them.