Skip to content

Tests on Windows - main part

Johannes Sixt git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16test-lib: Work around incompatible sort and find on Windowst/test-lib.sh+13 -00 replies
2/16test-lib: Work around missing sum on Windowst/test-lib.sh+3 -00 replies
3/16Tests on Windows: $(pwd) must return Windows-style pathst/t1504-ceiling-dirs.sh t/t6200-fmt-merge-msg.sh t/test-lib.sh+7 -30 replies
4/16t0050: Check whether git init detected symbolic link support correctlyt/t0050-filesystem.sh+26 -20 replies
5/16test-lib: Infrastructure to test and check for prerequisitest/t0000-basic.sh t/test-lib.sh+54 -51 reply
6/16t3600: Use test prerequisite tagst/t3600-rm.sh+30 -281 reply
7/16Skip tests that fail if the executable bit is not handled by the filesystemt/t3701-add-interactive.sh t/t4102-apply-rename.sh t/t4129-apply-samemode.sh +2 more+42 -200 replies
8/16t5302: Use prerequisite tags to skip 64-bit offset testst/t5302-pack-index.sh+5 -100 replies
9/16t9100, t9129: Use prerequisite tags for UTF-8 testst/t9100-git-svn-basic.sh t/t9129-git-svn-i18n-commitencoding.sh+28 -310 replies
10/16Use prerequisite tags to skip tests that depend on symbolic linkst/t0000-basic.sh t/t0055-beyond-symlinks.sh t/t1004-read-tree-m-u-wf.sh +29 more+211 -760 replies
11/16t0060: Fix tests on Windowst/t0060-path-utils.sh+83 -330 replies
12/16Skip tests that require a filesystem that obeys POSIX permissionst/t0004-unwritable.sh t/t1301-shared-repo.sh t/t3700-add.sh +3 more+23 -190 replies
13/16t3700: Skip a test with backslashes in pathspect/t3700-add.sh t/test-lib.sh+3 -13 replies
14/16Use prerequisites to skip tests that need unzipt/t0024-crlf-archive.sh t/t5000-tar-tree.sh+11 -110 replies
15/16t7004: Use prerequisite tags to skip tests that need gpgt/t7004-tag.sh+48 -490 replies
16/16t5503: GIT_DEBUG_SEND_PACK is not supported on MinGWt/t5503-tagfollow.sh+7 -00 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/16] Tests on Windows - main part

This is the remaining set of changes after which the test suite passes with the MinGW port. Well, almost: There still are a few failures, but none of them indicate a serious bug. We will address them later.

The series is again available from here:

git://repo.or.cz/git/mingw/j6t.git for-junio

It builds on js/windows-tests (a8cbc9ab).

The heart of this series is an addition to the test infrastructure:
Tests can be tagged by a keyword, which indicates that a particular feature ("prerequisite") is needed. This idea was presented by Junio some time ago, but I didn't save away the implementation.

The new features are used in this way:

1. The prerequisite is tested for and the tag is defined:

if frob --mode=nicate 2>/dev/null; then
test_set_prereq FROBNICATE
else
say "frobnication not possible, skipping some tests
fi

2. Tests are tagged by the tag name:

    test_expect_success FROBNICATE 'frobnication' '
	frob --mode=nicate
    '

Such a test is skipped if the tag was not defined before.

3. The prerequisite can also be tested for explicitly:

if test_have_prereq FROBNICATE; then
expect=foo
else
expect=bar
fi

I have considered a different approach to define prerequisites, namely with a helper function that is similar to test_expect_*:

    test_prereq FROBNICATE 'frobnication' '
	frob --mode=nicate 2>/dev/null
    '

but I find it a bit obfuscating.

Currently most prerequisites are tested for on demand. Symbolic links are tested for in test-lib.sh because so many test scripts need it. An option would be to move each test in its own file that would then be sourced on demand.

Johannes Sixt (16):
test-lib: Work around incompatible sort and find on Windows
test-lib: Work around missing sum on Windows
Tests on Windows: $(pwd) must return Windows-style paths
t0050: Check whether git init detected symbolic link support
correctly
test-lib: Infrastructure to test and check for prerequisites
t3600: Use test prerequisite tags
Skip tests that fail if the executable bit is not handled by the
filesystem
t5302: Use prerequisite tags to skip 64-bit offset tests t9100, t9129: Use prerequisite tags for UTF-8 tests Use prerequisite tags to skip tests that depend on symbolic links
t0060: Fix tests on Windows
Skip tests that require a filesystem that obeys POSIX permissions
t3700: Skip a test with backslashes in pathspec
Use prerequisites to skip tests that need unzip
t7004: Use prerequisite tags to skip tests that need gpg
t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW

 t/t0000-basic.sh                       |   58 +++++++++++++---
 t/t0004-unwritable.sh                  |    8 +-
 t/t0024-crlf-archive.sh                |    6 +-
 t/t0050-filesystem.sh                  |   28 +++++++-
 t/t0055-beyond-symlinks.sh             |    6 +-
 t/t0060-path-utils.sh                  |  116 +++++++++++++++++++++++---------
 t/t1004-read-tree-m-u-wf.sh            |    6 +-
 t/t1020-subdirectory.sh                |    2 +-
 t/t1300-repo-config.sh                 |    2 +-
 t/t1301-shared-repo.sh                 |   10 ++--
 t/t1504-ceiling-dirs.sh                |    2 +-
 t/t2001-checkout-cache-clash.sh        |    6 +-
 t/t2003-checkout-cache-mkdir.sh        |    8 +-
 t/t2004-checkout-cache-temp.sh         |    2 +-
 t/t2007-checkout-symlink.sh            |    6 ++
 t/t2100-update-cache-badpath.sh        |   14 +++-
 t/t2200-add-update.sh                  |    2 +-
 t/t2201-add-update-typechange.sh       |   16 ++++-
 t/t2300-cd-to-toplevel.sh              |   14 ++--
 t/t3000-ls-files-others.sh             |    7 ++-
 t/t3010-ls-files-killed-modified.sh    |   17 ++++-
 t/t3100-ls-tree-restrict.sh            |   40 +++++++----
 t/t3200-branch.sh                      |    2 +-
 t/t3600-rm.sh                          |   58 ++++++++--------
 t/t3700-add.sh                         |   16 ++--
 t/t3701-add-interactive.sh             |    9 ++-
 t/t4004-diff-rename-symlink.sh         |    7 ++
 t/t4008-diff-break-rewrite.sh          |    8 +-
 t/t4011-diff-symlink.sh                |    7 ++
 t/t4023-diff-rename-typechange.sh      |    7 ++
 t/t4102-apply-rename.sh                |    8 ++-
 t/t4114-apply-typechange.sh            |    7 ++
 t/t4115-apply-symlink.sh               |    7 ++
 t/t4122-apply-symlink-inside.sh        |    7 ++
 t/t4129-apply-samemode.sh              |   19 ++++--
 t/t5000-tar-tree.sh                    |   22 ++++---
 t/t5302-pack-index.sh                  |   15 ++---
 t/t5503-tagfollow.sh                   |    7 ++
 t/t5522-pull-symlink.sh                |    7 ++
 t/t6031-merge-recursive.sh             |   13 ++++
 t/t6200-fmt-merge-msg.sh               |    4 +-
 t/t7001-mv.sh                          |    4 +-
 t/t7004-tag.sh                         |   97 +++++++++++++-------------
 t/t7503-pre-commit-hook.sh             |    4 +-
 t/t7504-commit-msg-hook.sh             |    8 +-
 t/t9100-git-svn-basic.sh               |   37 +++++------
 t/t9129-git-svn-i18n-commitencoding.sh |   22 +++---
 t/t9131-git-svn-empty-symlink.sh       |    2 +-
 t/t9132-git-svn-broken-symlink.sh      |    4 +-
 t/t9200-git-cvsexportcommit.sh         |   13 ++--
 t/t9500-gitweb-standalone-no-errors.sh |   11 ++-
 t/test-lib.sh                          |   74 +++++++++++++++++++--
 52 files changed, 594 insertions(+), 288 deletions(-)