Code

Use prerequisite tags to skip tests that depend on symbolic links
authorJohannes Sixt <j6t@kdbg.org>
Wed, 4 Mar 2009 21:38:24 +0000 (22:38 +0100)
committerJohannes Sixt <j6t@kdbg.org>
Sun, 22 Mar 2009 16:26:44 +0000 (17:26 +0100)
commit704a3143d5ba0709727430154ef3dad600aad4de
treeace848d8b1548a6574b6c18c665369b9469c1464
parent7b7247b0d7cb6a105d87574642343480707414b3
Use prerequisite tags to skip tests that depend on symbolic links

Many tests depend on that symbolic links work.  This introduces a check
that sets the prerequisite tag SYMLINKS if the file system supports
symbolic links.  Since so many tests have to check for this prerequisite,
we do the check in test-lib.sh, so that we don't need to repeat the test
in many scripts.

To check for 'ln -s' failures, you can use a FAT partition on Linux:

$ mkdosfs -C git-on-fat 1000000
$ sudo mount -o loop,uid=j6t,gid=users,shortname=winnt git-on-fat /mnt

Clone git to /mnt and

$ GIT_SKIP_TESTS='t0001.1[34] t0010 t1301 t403[34] t4129.[47] t5701.7
          t7701.3 t9100 t9101.26 t9119 t9124.[67] t9200.10 t9600.6' \
        make test

(These additionally skipped tests depend on POSIX permissions that FAT on
Linux does not provide.)

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
32 files changed:
t/t0000-basic.sh
t/t0055-beyond-symlinks.sh
t/t1004-read-tree-m-u-wf.sh
t/t1020-subdirectory.sh
t/t1300-repo-config.sh
t/t2001-checkout-cache-clash.sh
t/t2003-checkout-cache-mkdir.sh
t/t2004-checkout-cache-temp.sh
t/t2007-checkout-symlink.sh
t/t2100-update-cache-badpath.sh
t/t2200-add-update.sh
t/t2201-add-update-typechange.sh
t/t2300-cd-to-toplevel.sh
t/t3000-ls-files-others.sh
t/t3010-ls-files-killed-modified.sh
t/t3100-ls-tree-restrict.sh
t/t3200-branch.sh
t/t3700-add.sh
t/t4004-diff-rename-symlink.sh
t/t4008-diff-break-rewrite.sh
t/t4011-diff-symlink.sh
t/t4023-diff-rename-typechange.sh
t/t4114-apply-typechange.sh
t/t4115-apply-symlink.sh
t/t4122-apply-symlink-inside.sh
t/t5000-tar-tree.sh
t/t5522-pull-symlink.sh
t/t7001-mv.sh
t/t9131-git-svn-empty-symlink.sh
t/t9132-git-svn-broken-symlink.sh
t/t9500-gitweb-standalone-no-errors.sh
t/test-lib.sh