[PATCH 00/10] describe tests: refactor & fix recent broken tests
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Feb 28, 2021, 19:54 UTC
- Message-ID
- <20210228195414.21372-1-avarab@gmail.com>
- In-Reply-To
- <20200223125102.6697-1-benno@bmevers.de>
While looking at the "git describe" tests due to the on-list %(describe) discussion I discovered that the feature added in 30b1c7ad9d (describe: don't abort too early when searching tags, 2020-02-26) has never been tested for.
This is because it defined a custom test function that called test_expect_success, which then got called inside another top-level test_expect_success. Thus even if it failed we'd pass the test.
This series fixes that issue, and makes some general improvements to the "describe" tests. I then make test_expect_{success,failure} return 1 to catch these sorts of issues in the future, which required fixes to a couple of svn tests that ran with "set -e".
I was on the fence about whether to send this after the recent rc0, but figured that since it's test-only Junio might want to pick it up, and possibly for the next rc in case we'd like to do some pre-release testing for this never-before-tested feature added in 2.26.0 (although the actual implementation looks fine to me).
Ævar Arnfjörð Bjarmason (10):
describe tests: improve test for --work-tree & --dirty
describe tests: refactor away from glob matching
describe tests: always assert empty stderr from "describe"
test-lib functions: add an --annotated-tag option to "test_commit"
describe tests: convert setup to use test_commit
describe tests: fix nested "test_expect_success" call
describe tests: support -C in "check_describe"
svn tests: remove legacy re-setup from init-clone test
svn tests: refactor away a "set -e" in test body
test-lib: return 1 from test_expect_{success,failure}t/t1403-show-ref.sh | 6 +- t/t6120-describe.sh | 193 +++++++++++++++------------------- t/t9117-git-svn-init-clone.sh | 6 -- t/t9148-git-svn-propset.sh | 27 ++--- t/test-lib-functions.sh | 20 +++- 5 files changed, 122 insertions(+), 130 deletions(-)
-- 2.31.0.rc0.116.g45ec00aa00