Skip to content

setup tests

Nguyễn Thái Ngọc Duy git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest18 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/18rev-parse: add --internal-cwd and --internal-git-dir for testsbuiltin/rev-parse.c+11 -04 replies
2/18Add t1510 for setup testst/t1510-repo-setup.sh+56 -00 replies
3/18t1510: setup case #0t/t1510-repo-setup.sh+44 -00 replies
4/18t1510: setup case #1t/t1510-repo-setup.sh+42 -00 replies
5/18t1510: setup case #2t/t1510-repo-setup.sh+63 -00 replies
6/18t1510: setup case #3t/t1510-repo-setup.sh+255 -00 replies
7/18t1510: setup case #4t/t1510-repo-setup.sh+131 -00 replies
8/18t1510: setup case #5t/t1510-repo-setup.sh+135 -00 replies
9/18t1510: setup case #6t/t1510-repo-setup.sh+279 -00 replies
10/18t1510: setup case #7t/t1510-repo-setup.sh+261 -00 replies
11/18t1510: setup case #8t/t1510-repo-setup.sh+52 -00 replies
12/18t1510: setup case #9t/t1510-repo-setup.sh+48 -00 replies
13/18t1510: setup case #10t/t1510-repo-setup.sh+63 -00 replies
14/18t1510: setup case #11t/t1510-repo-setup.sh+255 -00 replies
15/18t1510: setup case #12t/t1510-repo-setup.sh+132 -00 replies
16/18t1510: setup case #13t/t1510-repo-setup.sh+132 -00 replies
17/18t1510: setup case #14t/t1510-repo-setup.sh+279 -00 replies
18/18t1510: setup case #15t/t1510-repo-setup.sh+256 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [WIP PATCH 00/18] setup tests

These tests are created according to [1] and its following discussions. I have yet to create tests for the last 16 cases, which might be simpler. Tests from 8-15 are usually copy of 0-7 with some modification. If you find bugs in 0-7, stop reading 8-15, it's just wasting time.

The rules are bent a bit the way the code does it, specifically:

- GIT_WORK_TREE is relative to cwd, not GIT_DIR
- core.worktree is always effective regardless GIT_DIR/--git-dir

Also I assume that when cwd is outside worktree, cwd should be unchanged (therefore prefix is NULL). This is the behavior when GIT_DIR and GIT_WORK_TREE are set. Let's apply it to all other cases where cwd may be outside worktree.

Adjusting the expected results is not hard. So it's up to you guys. Once we agree on something, I can update the tests.

Also when GIT_DIR is set, .git _file_ is not recognized because setup_explicit_git_dir() does not accept it. There are a _lot_ of failed tests due to this. I probably should fix that, otherwise tests #8-15 may not be very reliable.

[1] http://mid.gmane.org/20101020085859.GA13135@do

Nguyễn Thái Ngọc Duy (18):
rev-parse: add --internal-cwd and --internal-git-dir for tests Add t1510 for setup tests
t1510: setup case #0
t1510: setup case #1
t1510: setup case #2
t1510: setup case #3
t1510: setup case #4
t1510: setup case #5
t1510: setup case #6
t1510: setup case #7
t1510: setup case #8
t1510: setup case #9
t1510: setup case #10
t1510: setup case #11
t1510: setup case #12
t1510: setup case #13
t1510: setup case #14
t1510: setup case #15

 builtin/rev-parse.c   |   11 +
 t/t1510-repo-setup.sh | 2483 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 2494 insertions(+), 0 deletions(-)
 create mode 100755 t/t1510-repo-setup.sh