Skip to content

Commit ef54ed5

Browse files
committed
Merge branch 'dd/test-with-busybox'
This topic branch is actually _required_ for `dd/ci-musl-libc` to work. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents bae9f17 + 84370e3 commit ef54ed5

8 files changed

+25
-21
lines changed

t/helper/test-pkt-line.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void unpack_sideband(void)
6767
case PACKET_READ_NORMAL:
6868
band = reader.line[0] & 0xff;
6969
if (band < 1 || band > 2)
70-
die("unexpected side band %d", band);
70+
continue; /* skip non-sideband packets */
7171
fd = band;
7272

7373
write_or_die(fd, reader.line + 1, reader.pktlen - 1);

t/t4061-diff-indent.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ compare_diff () {
1717
# Compare blame output using the expectation for a diff as reference.
1818
# Only look for the lines coming from non-boundary commits.
1919
compare_blame () {
20-
sed -n -e "1,4d" -e "s/^\+//p" <"$1" >.tmp-1
20+
sed -n -e "1,4d" -e "s/^+//p" <"$1" >.tmp-1
2121
sed -ne "s/^[^^][^)]*) *//p" <"$2" >.tmp-2
2222
test_cmp .tmp-1 .tmp-2 && rm -f .tmp-1 .tmp-2
2323
}

t/t4124-apply-ws-rule.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ test_fix () {
5252

5353
# find touched lines
5454
$DIFF file target | sed -n -e "s/^> //p" >fixed
55+
# busybox's diff(1) doesn't output normal format
56+
if ! test -s fixed
57+
then
58+
$DIFF -u file target |
59+
grep -v '^+++ target' |
60+
sed -ne "/^+/s/+//p" >fixed
61+
fi
5562

5663
# the changed lines are all expected to change
5764
fixed_cnt=$(wc -l <fixed)

t/t5003-archive-zip.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ test_description='git archive --format=zip test'
77
SUBSTFORMAT=%H%n
88

99
test_lazy_prereq UNZIP_SYMLINKS '
10-
(
11-
mkdir unzip-symlinks &&
12-
cd unzip-symlinks &&
13-
"$GIT_UNZIP" "$TEST_DIRECTORY"/t5003/infozip-symlinks.zip &&
14-
test -h symlink
15-
)
10+
"$GIT_UNZIP" "$TEST_DIRECTORY"/t5003/infozip-symlinks.zip &&
11+
test -h symlink
12+
'
13+
14+
test_lazy_prereq UNZIP_CONVERT '
15+
"$GIT_UNZIP" -a "$TEST_DIRECTORY"/t5003/infozip-symlinks.zip
1616
'
1717

1818
check_zip() {
@@ -39,33 +39,33 @@ check_zip() {
3939
extracted=${dir_with_prefix}a
4040
original=a
4141

42-
test_expect_success UNZIP " extract ZIP archive with EOL conversion" '
42+
test_expect_success UNZIP_CONVERT " extract ZIP archive with EOL conversion" '
4343
(mkdir $dir && cd $dir && "$GIT_UNZIP" -a ../$zipfile)
4444
'
4545

46-
test_expect_success UNZIP " validate that text files are converted" "
46+
test_expect_success UNZIP_CONVERT " validate that text files are converted" "
4747
test_cmp_bin $extracted/text.cr $extracted/text.crlf &&
4848
test_cmp_bin $extracted/text.cr $extracted/text.lf
4949
"
5050

51-
test_expect_success UNZIP " validate that binary files are unchanged" "
51+
test_expect_success UNZIP_CONVERT " validate that binary files are unchanged" "
5252
test_cmp_bin $original/binary.cr $extracted/binary.cr &&
5353
test_cmp_bin $original/binary.crlf $extracted/binary.crlf &&
5454
test_cmp_bin $original/binary.lf $extracted/binary.lf
5555
"
5656

57-
test_expect_success UNZIP " validate that diff files are converted" "
57+
test_expect_success UNZIP_CONVERT " validate that diff files are converted" "
5858
test_cmp_bin $extracted/diff.cr $extracted/diff.crlf &&
5959
test_cmp_bin $extracted/diff.cr $extracted/diff.lf
6060
"
6161

62-
test_expect_success UNZIP " validate that -diff files are unchanged" "
62+
test_expect_success UNZIP_CONVERT " validate that -diff files are unchanged" "
6363
test_cmp_bin $original/nodiff.cr $extracted/nodiff.cr &&
6464
test_cmp_bin $original/nodiff.crlf $extracted/nodiff.crlf &&
6565
test_cmp_bin $original/nodiff.lf $extracted/nodiff.lf
6666
"
6767

68-
test_expect_success UNZIP " validate that custom diff is unchanged " "
68+
test_expect_success UNZIP_CONVERT " validate that custom diff is unchanged " "
6969
test_cmp_bin $original/custom.cr $extracted/custom.cr &&
7070
test_cmp_bin $original/custom.crlf $extracted/custom.crlf &&
7171
test_cmp_bin $original/custom.lf $extracted/custom.lf

t/t5616-partial-clone.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test_expect_success 'do partial clone 1' '
4949
test_expect_success 'verify that .promisor file contains refs fetched' '
5050
ls pc1/.git/objects/pack/pack-*.promisor >promisorlist &&
5151
test_line_count = 1 promisorlist &&
52-
git -C srv.bare rev-list HEAD >headhash &&
52+
git -C srv.bare rev-parse --verify HEAD >headhash &&
5353
grep "$(cat headhash) HEAD" $(cat promisorlist) &&
5454
grep "$(cat headhash) refs/heads/master" $(cat promisorlist)
5555
'

t/t5703-upload-pack-ref-in-want.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ get_actual_refs () {
1313
}
1414

1515
get_actual_commits () {
16-
sed -n -e '/packfile/,/0000/{
17-
/packfile/d
18-
p
19-
}' <out | test-tool pkt-line unpack-sideband >o.pack &&
16+
test-tool pkt-line unpack-sideband <out >o.pack &&
2017
git index-pack o.pack &&
2118
git verify-pack -v o.idx >objs &&
2219
grep commit objs | cut -d" " -f1 | sort >actual_commits

t/t7063-status-untracked-cache.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ GIT_FORCE_UNTRACKED_CACHE=true
1818
export GIT_FORCE_UNTRACKED_CACHE
1919

2020
sync_mtime () {
21-
find . -type d -ls >/dev/null
21+
find . -type d -exec ls -ld {} + >/dev/null
2222
}
2323

2424
avoid_racy() {

t/test-lib-functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ test_expect_code () {
905905
# - not all diff versions understand "-u"
906906

907907
test_cmp() {
908-
$GIT_TEST_CMP "$@"
908+
eval "$GIT_TEST_CMP" '"$@"'
909909
}
910910

911911
# Check that the given config key has the expected value.

0 commit comments

Comments
 (0)