github.com/driusan/dgit@v0.0.0-20221118233547-f39f0c15edbb/official-git/run-tests.sh (about) 1 #!/bin/bash 2 3 # Runs the offical git command line scripts from a specific version. 4 # Command line arguments to this script are the ones given to make 5 # in the git/t directory where the test cases are defined. 6 # E.g. ./run-official-tests.sh -i t0000-basic.sh 7 # Runs the tests defined in the shell script and ignores failures (-i) 8 9 set -e 10 11 # This is the tag of the release that dgit originated 12 TAG=v2.10.0 13 14 d=`dirname $0` 15 16 cd $d 17 d=`pwd` 18 19 cd $d/..; go build 20 21 cd $d 22 git clone https://github.com/git/git.git git || echo "Using existing official git" 23 cd git 24 git checkout "$TAG" 25 patch -p1 -N < "$d/fix-checkout-branch.patch" || echo "Fix checkout branch tests patch already applied" 26 git apply ../force-official-git-pack-objects.patch || echo "Force official git pack objects patch already applied" 27 make 28 test -f git.official || cp git git.official 29 rm git 30 cp ../../dgit git 31 rm git-init 32 cp ../git-init . 33 chmod a+x git-init 34 rm git-ls-remote 35 36 sed s/init/ls-remote/g git-init > git-ls-remote 37 chmod a+x git-ls-remote 38 39 rm git-remote 40 sed s/init/remote/g git-remote > git-remote 41 chmod a+x git-remote 42 cd t 43 44 # t0006 needs git repack and cat-file %(deltabase), cat-file options allow-unknown-type and cat-file --follow-symlinks 45 # t0008 tests that are skipped require ! to negate a pattern. (GitHub issue #72) 46 # t1004.16 needs "git merge-resolve" (which isn't documented anywhere I can find) 47 # t1004.17 needs "git merge-recursive" (which also isn't documented) 48 # t1014.26 needs "git config --unset-all" 49 # t3000.7 requires git pack-refs 50 51 GIT_SKIP_TESTS="t1006.8[6789] t1006.9[0-9] t1006.10[0-9] t1006.110" 52 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t0008.321 t0008.323 t0008.37[0-9] t0008.38[0-7] t0008.39[1-2]" 53 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t1004.1[6-7]" 54 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t1014.26" 55 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t1308.2[6-7]" # No support for line ending handling or GIT_CEILING_DIRECTORIES 56 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t1450.49 t1450.5[0-9]" # Only up to nul in commit is implemented. 57 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t1503.[5-7] t1503.10" # No support for @{suffix} (looking up based on reflog) in rev-parse 58 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t2018.[6-7] t2018.[9] t2018.1[5-8]" 59 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t3000.7" 60 # Only the setup for pack-objects tests has been tested 61 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5300.1[7-9] t5300.2[0-9] t5300.3[0-3]" 62 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5512.1[1234] t5512.1[079] t5512.9 t5512.2[01234]" # 1[234] seem to get stuck in an infinite loop. The rest fail and need investigation. 63 GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5510.[4-9] t5510.[1-7][0-9]" # Just the basic fetch tests are working for now 64 export GIT_SKIP_TESTS 65 66 echo t0000-basic 67 ./t0000-basic.sh 68 echo t0004-unwritable 69 ./t0004-unwritable.sh 70 echo t0007-git-var 71 ./t0007-git-var.sh 72 echo t0008-ignores 73 ./t0008-ignores.sh 74 echo t0010-racy-git 75 ./t0010-racy-git.sh 76 echo t0062-revision-walking 77 ./t0062-revision-walking.sh 78 echo t0070-fundamental 79 ./t0070-fundamental.sh 80 echo t0081-line-buffer 81 ./t0081-line-buffer.sh 82 echo t1000-read-tree-m-3way 83 ./t1000-read-tree-m-3way.sh 84 echo t1001-read-tree-m-2way 85 ./t1001-read-tree-m-2way.sh 86 echo t1002-read-tree-m-u-2way 87 ./t1002-read-tree-m-u-2way.sh 88 echo t1003-read-tree-prefix 89 ./t1003-read-tree-prefix.sh 90 echo t1004-read-tree-m-u-wf 91 ./t1004-read-tree-m-u-wf.sh 92 echo t1005-read-tree-reset 93 ./t1005-read-tree-reset.sh 94 echo t1006-cat-file.sh 95 ./t1006-cat-file.sh 96 echo t1008-read-tree-overlay 97 ./t1008-read-tree-overlay.sh 98 echo t1009-read-tree-new-index 99 ./t1009-read-tree-new-index.sh 100 echo t1011-read-tree-sparse-checkout 101 ./t1011-read-tree-sparse-checkout.sh 102 echo t1012-read-tree-df 103 ./t1012-read-tree-df.sh 104 echo t1014-read-tree-confusing 105 ./t1014-read-tree-confusing.sh 106 echo t1100-commit-tree-options 107 ./t1100-commit-tree-options.sh 108 # At one point default-acl was working by coincidence, but 109 # it was never explicitly fixed/implemented and the test 110 # started breaking different, intentional bug fix. 111 # echo t1304-default-acl 112 # ./t1304-default-acl.sh 113 echo t1308-config-set 114 ./t1308-config-set.sh 115 echo t1403-show-ref 116 ./t1403-show-ref.sh 117 echo t1450-fsck 118 ./t1450-fsck.sh 119 echo t1500-rev-parse 120 ./t1500-rev-parse.sh 121 echo t1503-rev-parse-verify 122 ./t1503-rev-parse-verify.sh 123 echo t2000-checkout-cache-clash 124 ./t2000-checkout-cache-clash.sh 125 echo t2001-checkout-cache-clash 126 ./t2001-checkout-cache-clash.sh 127 echo t2002-checkout-cache-u 128 ./t2002-checkout-cache-u.sh 129 echo t2006-checkout-index-basic 130 ./t2006-checkout-index-basic.sh 131 echo t2009-checkout-statinfo 132 ./t2009-checkout-statinfo.sh 133 echo t2014-switch 134 ./t2014-switch.sh 135 echo t2018-checkout-branch 136 ./t2018-checkout-branch.sh 137 echo t2100-update-cache-badpath 138 ./t2100-update-cache-badpath.sh 139 echo t3000-ls-files-others 140 ./t3000-ls-files-others.sh 141 echo t3002-ls-files-dashpath 142 ./t3002-ls-files-dashpath.sh 143 echo t3006-ls-files-long 144 ./t3006-ls-files-long.sh 145 echo t3020-ls-files-error-unmatch 146 ./t3020-ls-files-error-unmatch.sh 147 echo t3800-mktag 148 ./t3800-mktag.sh 149 echo t4113-apply-ending 150 ./t4113-apply-ending.sh 151 echo t4123-apply-shrink 152 ./t4123-apply-shrink.sh 153 echo t5300-pack-object.sh 154 ./t5300-pack-object.sh 155 echo t5510-fetch.sh 156 ./t5510-fetch.sh 157 echo t5512-ls-remote.sh 158 ./t5512-ls-remote.sh 159 echo t7062-wtstatus-ignorecase 160 ./t7062-wtstatus-ignorecase.sh 161 echo t7511-status-index 162 ./t7511-status-index.sh 163