Skip to content

Commit 3c1bfd5

Browse files
committed
fix journey test (remove usage of tree)
It seems homebrew `tree` keeps messing up directory counts, which may make it incompatible with CI and generaly makes it impossible to use in a cross-platform manner. Thus it was replaced with `find`.
1 parent 9525ac8 commit 3c1bfd5

8 files changed

+141
-255
lines changed

tests/journey/ein.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ title "Porcelain ${kind}"
112112

113113
it "does not change the directory structure at all" && {
114114
WITH_SNAPSHOT="$snapshot/initial-directory-structure" \
115-
expect_run $SUCCESSFULLY tree -L 2
115+
expect_run_sh $SUCCESSFULLY 'find . -maxdepth 2 | sort'
116116
}
117117
)
118118

@@ -124,7 +124,7 @@ title "Porcelain ${kind}"
124124

125125
it "changes the directory structure" && {
126126
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
127-
expect_run $SUCCESSFULLY tree -L 2
127+
expect_run_sh $SUCCESSFULLY 'find . -maxdepth 2 | sort'
128128
}
129129
)
130130

@@ -136,7 +136,7 @@ title "Porcelain ${kind}"
136136

137137
it "does not alter the directory structure as these are already in place" && {
138138
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
139-
expect_run $SUCCESSFULLY tree -L 2
139+
expect_run_sh $SUCCESSFULLY 'find . -maxdepth 2 | sort'
140140
}
141141
)
142142
)

tests/journey/gix.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ title "gix attributes"
462462
expect_run $WITH_FAILURE test -e "${PACK_FILE}".idx
463463
}
464464

465-
(with_program tree
465+
(with_program find
466466

467467
if test "$kind" = "small" ; then
468468
suffix=miniz-oxide
@@ -473,7 +473,7 @@ title "gix attributes"
473473
fi
474474
it "creates all pack objects, but the broken ones" && {
475475
WITH_SNAPSHOT="$snapshot/broken-with-objects-dir-skip-checks-success-tree-$suffix" \
476-
expect_run $SUCCESSFULLY tree
476+
expect_run_sh $SUCCESSFULLY 'find . -type f | sort'
477477
}
478478
)
479479
)
@@ -495,10 +495,10 @@ title "gix attributes"
495495
"${PACK_FILE}.pack" .
496496
}
497497

498-
(with_program tree
498+
(with_program find
499499
it "creates all pack objects" && {
500500
WITH_SNAPSHOT="$snapshot/with-objects-dir-success-tree" \
501-
expect_run $SUCCESSFULLY tree
501+
expect_run_sh $SUCCESSFULLY 'find . -type f | sort'
502502
}
503503
)
504504
)
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,26 @@
1-
.
2-
├── 0e
3-
│   └── ad45fc727edcf5cadca25ef922284f32bb6fc1
4-
├── 15
5-
│   └── 926d8d6d17d1cbdf7f03c457e8ff983270f363
6-
├── 18
7-
│   └── bd3fc20b0565f94bce0a3e94b6a83b26b88627
8-
├── 1d
9-
│   └── fd336d2290794b0b1f80d98af33f725da6f42d
10-
├── 2b
11-
│   └── 621c1a3aac23b8258885a9b4658d9ac993742f
12-
├── 2c
13-
│   └── 1e59ee54facb7d72c0061d06b9fe3889f357a9
14-
├── 2d
15-
│   └── ad8b277db3a95919bd904133d7e7cc3e323cb9
16-
├── 3a
17-
│   └── b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
18-
├── 3d
19-
│   └── 650a1c41a4529863818fd613b95e83668bbfc1
20-
├── 41
21-
│   └── 97ce3c6d943759e1088a0298b64571b4bc725a
22-
├── 50
23-
│   └── 1b297447a8255d3533c6858bb692575cdefaa0
24-
├── 5d
25-
│   └── e2eda652f29103c0d160f8c05d7e83b653a157
26-
├── 66
27-
│   └── 74d310d179400358d581f9725cbd4a2c32e3bf
28-
├── 68
29-
│   └── b95733c796b12571fb1f656062a15a78e7dcf4
30-
├── 83
31-
│   └── d9602eccfc733a550812ce492d4caa0af625c8
32-
├── 84
33-
│   ├── 26f672fc65239135b1f1580bb79ecb16fd05f0
34-
│   └── 81dbefa2fb9398a673fe1f48dc480c1f558890
35-
├── 85
36-
│   └── 48234cfc7b4f0c9475d24d4c386783533a8034
37-
├── 88
38-
│   └── 58983d81b0eef76eb55d21a0d96b7b16846eca
39-
├── af
40-
│   └── 4f6405296dec699321ca59d48583ffa0323b0e
41-
├── b2
42-
│   └── 025146d0718d953036352f8435cfa392b1d799
43-
├── bb
44-
│   └── a287531b3a845faa032a8fef3e6d70d185c89b
45-
├── bd
46-
│   └── 91890c62d85ec16aadd3fb991b3ad7a365adde
47-
├── cb
48-
│   └── 572206d9dac4ba52878e7e1a4a7028d85707ab
49-
├── e2
50-
│   └── 34c232ce0b8acef3f43fa34c036e68522b5612
51-
└── e8
52-
└── 00b9c207e17f9b11e321cc1fba5dfe08af4222
53-
54-
25 directories, 26 files
1+
./0e/ad45fc727edcf5cadca25ef922284f32bb6fc1
2+
./15/926d8d6d17d1cbdf7f03c457e8ff983270f363
3+
./18/bd3fc20b0565f94bce0a3e94b6a83b26b88627
4+
./1d/fd336d2290794b0b1f80d98af33f725da6f42d
5+
./2b/621c1a3aac23b8258885a9b4658d9ac993742f
6+
./2c/1e59ee54facb7d72c0061d06b9fe3889f357a9
7+
./2d/ad8b277db3a95919bd904133d7e7cc3e323cb9
8+
./3a/b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
9+
./3d/650a1c41a4529863818fd613b95e83668bbfc1
10+
./41/97ce3c6d943759e1088a0298b64571b4bc725a
11+
./50/1b297447a8255d3533c6858bb692575cdefaa0
12+
./5d/e2eda652f29103c0d160f8c05d7e83b653a157
13+
./66/74d310d179400358d581f9725cbd4a2c32e3bf
14+
./68/b95733c796b12571fb1f656062a15a78e7dcf4
15+
./83/d9602eccfc733a550812ce492d4caa0af625c8
16+
./84/26f672fc65239135b1f1580bb79ecb16fd05f0
17+
./84/81dbefa2fb9398a673fe1f48dc480c1f558890
18+
./85/48234cfc7b4f0c9475d24d4c386783533a8034
19+
./88/58983d81b0eef76eb55d21a0d96b7b16846eca
20+
./af/4f6405296dec699321ca59d48583ffa0323b0e
21+
./b2/025146d0718d953036352f8435cfa392b1d799
22+
./bb/a287531b3a845faa032a8fef3e6d70d185c89b
23+
./bd/91890c62d85ec16aadd3fb991b3ad7a365adde
24+
./cb/572206d9dac4ba52878e7e1a4a7028d85707ab
25+
./e2/34c232ce0b8acef3f43fa34c036e68522b5612
26+
./e8/00b9c207e17f9b11e321cc1fba5dfe08af4222
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,26 @@
1-
.
2-
├── 0e
3-
│   └── ad45fc727edcf5cadca25ef922284f32bb6fc1
4-
├── 15
5-
│   └── 926d8d6d17d1cbdf7f03c457e8ff983270f363
6-
├── 18
7-
│   └── bd3fc20b0565f94bce0a3e94b6a83b26b88627
8-
├── 1d
9-
│   └── fd336d2290794b0b1f80d98af33f725da6f42d
10-
├── 2b
11-
│   └── 621c1a3aac23b8258885a9b4658d9ac993742f
12-
├── 2c
13-
│   └── 1e59ee54facb7d72c0061d06b9fe3889f357a9
14-
├── 2d
15-
│   └── ad8b277db3a95919bd904133d7e7cc3e323cb9
16-
├── 3a
17-
│   └── b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
18-
├── 3d
19-
│   └── 650a1c41a4529863818fd613b95e83668bbfc1
20-
├── 41
21-
│   └── 97ce3c6d943759e1088a0298b64571b4bc725a
22-
├── 50
23-
│   └── 1b297447a8255d3533c6858bb692575cdefaa0
24-
├── 5d
25-
│   └── e2eda652f29103c0d160f8c05d7e83b653a157
26-
├── 66
27-
│   └── 74d310d179400358d581f9725cbd4a2c32e3bf
28-
├── 68
29-
│   └── b95733c796b12571fb1f656062a15a78e7dcf4
30-
├── 83
31-
│   └── d9602eccfc733a550812ce492d4caa0af625c8
32-
├── 84
33-
│   ├── 26f672fc65239135b1f1580bb79ecb16fd05f0
34-
│   └── 81dbefa2fb9398a673fe1f48dc480c1f558890
35-
├── 85
36-
│   └── 48234cfc7b4f0c9475d24d4c386783533a8034
37-
├── 88
38-
│   └── 58983d81b0eef76eb55d21a0d96b7b16846eca
39-
├── af
40-
│   └── 4f6405296dec699321ca59d48583ffa0323b0e
41-
├── b2
42-
│   └── 025146d0718d953036352f8435cfa392b1d799
43-
├── bb
44-
│   └── a287531b3a845faa032a8fef3e6d70d185c89b
45-
├── bd
46-
│   └── 91890c62d85ec16aadd3fb991b3ad7a365adde
47-
├── cb
48-
│   └── 572206d9dac4ba52878e7e1a4a7028d85707ab
49-
├── e2
50-
│   └── 34c232ce0b8acef3f43fa34c036e68522b5612
51-
└── e8
52-
└── 00b9c207e17f9b11e321cc1fba5dfe08af4222
53-
54-
25 directories, 26 files
1+
./0e/ad45fc727edcf5cadca25ef922284f32bb6fc1
2+
./15/926d8d6d17d1cbdf7f03c457e8ff983270f363
3+
./18/bd3fc20b0565f94bce0a3e94b6a83b26b88627
4+
./1d/fd336d2290794b0b1f80d98af33f725da6f42d
5+
./2b/621c1a3aac23b8258885a9b4658d9ac993742f
6+
./2c/1e59ee54facb7d72c0061d06b9fe3889f357a9
7+
./2d/ad8b277db3a95919bd904133d7e7cc3e323cb9
8+
./3a/b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
9+
./3d/650a1c41a4529863818fd613b95e83668bbfc1
10+
./41/97ce3c6d943759e1088a0298b64571b4bc725a
11+
./50/1b297447a8255d3533c6858bb692575cdefaa0
12+
./5d/e2eda652f29103c0d160f8c05d7e83b653a157
13+
./66/74d310d179400358d581f9725cbd4a2c32e3bf
14+
./68/b95733c796b12571fb1f656062a15a78e7dcf4
15+
./83/d9602eccfc733a550812ce492d4caa0af625c8
16+
./84/26f672fc65239135b1f1580bb79ecb16fd05f0
17+
./84/81dbefa2fb9398a673fe1f48dc480c1f558890
18+
./85/48234cfc7b4f0c9475d24d4c386783533a8034
19+
./88/58983d81b0eef76eb55d21a0d96b7b16846eca
20+
./af/4f6405296dec699321ca59d48583ffa0323b0e
21+
./b2/025146d0718d953036352f8435cfa392b1d799
22+
./bb/a287531b3a845faa032a8fef3e6d70d185c89b
23+
./bd/91890c62d85ec16aadd3fb991b3ad7a365adde
24+
./cb/572206d9dac4ba52878e7e1a4a7028d85707ab
25+
./e2/34c232ce0b8acef3f43fa34c036e68522b5612
26+
./e8/00b9c207e17f9b11e321cc1fba5dfe08af4222
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,27 @@
1-
.
2-
├── 0e
3-
│   └── ad45fc727edcf5cadca25ef922284f32bb6fc1
4-
├── 15
5-
│   └── 926d8d6d17d1cbdf7f03c457e8ff983270f363
6-
├── 18
7-
│   └── bd3fc20b0565f94bce0a3e94b6a83b26b88627
8-
├── 1d
9-
│   └── fd336d2290794b0b1f80d98af33f725da6f42d
10-
├── 2b
11-
│   └── 621c1a3aac23b8258885a9b4658d9ac993742f
12-
├── 2c
13-
│   └── 1e59ee54facb7d72c0061d06b9fe3889f357a9
14-
├── 2d
15-
│   └── ad8b277db3a95919bd904133d7e7cc3e323cb9
16-
├── 3a
17-
│   └── b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
18-
├── 3d
19-
│   └── 650a1c41a4529863818fd613b95e83668bbfc1
20-
├── 41
21-
│   └── 97ce3c6d943759e1088a0298b64571b4bc725a
22-
├── 50
23-
│   └── 1b297447a8255d3533c6858bb692575cdefaa0
24-
├── 5d
25-
│   └── e2eda652f29103c0d160f8c05d7e83b653a157
26-
├── 66
27-
│   └── 74d310d179400358d581f9725cbd4a2c32e3bf
28-
├── 68
29-
│   └── b95733c796b12571fb1f656062a15a78e7dcf4
30-
├── 83
31-
│   └── d9602eccfc733a550812ce492d4caa0af625c8
32-
├── 84
33-
│   ├── 26f672fc65239135b1f1580bb79ecb16fd05f0
34-
│   └── 81dbefa2fb9398a673fe1f48dc480c1f558890
35-
├── 85
36-
│   └── 48234cfc7b4f0c9475d24d4c386783533a8034
37-
├── 88
38-
│   └── 58983d81b0eef76eb55d21a0d96b7b16846eca
39-
├── a2
40-
│   └── 9ebd0e0fcbcd2a0842dd44cc7c22a90a310a3a
41-
├── af
42-
│   └── 4f6405296dec699321ca59d48583ffa0323b0e
43-
├── b2
44-
│   └── 025146d0718d953036352f8435cfa392b1d799
45-
├── bb
46-
│   └── a287531b3a845faa032a8fef3e6d70d185c89b
47-
├── bd
48-
│   └── 91890c62d85ec16aadd3fb991b3ad7a365adde
49-
├── cb
50-
│   └── 572206d9dac4ba52878e7e1a4a7028d85707ab
51-
├── e2
52-
│   └── 34c232ce0b8acef3f43fa34c036e68522b5612
53-
└── e8
54-
└── 00b9c207e17f9b11e321cc1fba5dfe08af4222
55-
56-
26 directories, 27 files
1+
./0e/ad45fc727edcf5cadca25ef922284f32bb6fc1
2+
./15/926d8d6d17d1cbdf7f03c457e8ff983270f363
3+
./18/bd3fc20b0565f94bce0a3e94b6a83b26b88627
4+
./1d/fd336d2290794b0b1f80d98af33f725da6f42d
5+
./2b/621c1a3aac23b8258885a9b4658d9ac993742f
6+
./2c/1e59ee54facb7d72c0061d06b9fe3889f357a9
7+
./2d/ad8b277db3a95919bd904133d7e7cc3e323cb9
8+
./3a/b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
9+
./3d/650a1c41a4529863818fd613b95e83668bbfc1
10+
./41/97ce3c6d943759e1088a0298b64571b4bc725a
11+
./50/1b297447a8255d3533c6858bb692575cdefaa0
12+
./5d/e2eda652f29103c0d160f8c05d7e83b653a157
13+
./66/74d310d179400358d581f9725cbd4a2c32e3bf
14+
./68/b95733c796b12571fb1f656062a15a78e7dcf4
15+
./83/d9602eccfc733a550812ce492d4caa0af625c8
16+
./84/26f672fc65239135b1f1580bb79ecb16fd05f0
17+
./84/81dbefa2fb9398a673fe1f48dc480c1f558890
18+
./85/48234cfc7b4f0c9475d24d4c386783533a8034
19+
./88/58983d81b0eef76eb55d21a0d96b7b16846eca
20+
./a2/9ebd0e0fcbcd2a0842dd44cc7c22a90a310a3a
21+
./af/4f6405296dec699321ca59d48583ffa0323b0e
22+
./b2/025146d0718d953036352f8435cfa392b1d799
23+
./bb/a287531b3a845faa032a8fef3e6d70d185c89b
24+
./bd/91890c62d85ec16aadd3fb991b3ad7a365adde
25+
./cb/572206d9dac4ba52878e7e1a4a7028d85707ab
26+
./e2/34c232ce0b8acef3f43fa34c036e68522b5612
27+
./e8/00b9c207e17f9b11e321cc1fba5dfe08af4222

0 commit comments

Comments
 (0)