File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ tempdir=$(mktemp -d)
7
7
cd " $tempdir "
8
8
9
9
# Check out the upstream test suite
10
- git clone -n --depth=1 --filter=tree:0 https://git.savannah.gnu.org/git/diffutils.git
10
+ testsuite=" https://git.savannah.gnu.org/git/diffutils.git"
11
+ echo " Fetching upstream test suite from $testsuite "
12
+ git clone -n --depth=1 --filter=tree:0 " $testsuite " & > /dev/null
11
13
cd diffutils
12
- git sparse-checkout set --no-cone tests
13
- git checkout
14
+ git sparse-checkout set --no-cone tests & > /dev/null
15
+ git checkout & > /dev/null
14
16
15
17
# Ensure that calling `diff` invokes the built binary instead of
16
18
# the upstream binary that is most likely installed on the system
@@ -22,18 +24,22 @@ cd ../tests
22
24
# Get a list of all upstream tests and run only those that invoke `diff`
23
25
echo -e ' \n\nprinttests:\n\t@echo "${TESTS}"' >> Makefile.am
24
26
tests=$( make -f Makefile.am printtests)
27
+ echo " Running $( echo " $tests " | wc -w) tests"
25
28
export LC_ALL=C
26
29
pass=" $( tput setaf 2) PASS$( tput sgr0) "
27
30
fail=" $( tput setaf 1) FAIL$( tput sgr0) "
31
+ skip=SKIP
28
32
exitcode=0
29
33
for test in $tests
30
34
do
35
+ result=$fail
31
36
if ! grep -E -s -q " (cmp|diff3|sdiff)" " $test "
32
37
then
33
- result=$fail
34
38
sh " $test " & > /dev/null && result=$pass || exitcode=1
35
- printf " %-40s $result \n" " $test "
39
+ else
40
+ result=$skip
36
41
fi
42
+ printf " %-40s $result \n" " $test "
37
43
done
38
44
39
45
# Clean up
You can’t perform that action at this time.
0 commit comments