Skip to content

Commit

Permalink
fix journey test (remove usage of tree)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
Byron committed Jun 6, 2023
1 parent 9525ac8 commit 3c1bfd5
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 255 deletions.
6 changes: 3 additions & 3 deletions tests/journey/ein.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ title "Porcelain ${kind}"

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

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

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

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

it "does not alter the directory structure as these are already in place" && {
WITH_SNAPSHOT="$snapshot/directory-structure-after-organize" \
expect_run $SUCCESSFULLY tree -L 2
expect_run_sh $SUCCESSFULLY 'find . -maxdepth 2 | sort'
}
)
)
Expand Down
8 changes: 4 additions & 4 deletions tests/journey/gix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ title "gix attributes"
expect_run $WITH_FAILURE test -e "${PACK_FILE}".idx
}

(with_program tree
(with_program find

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

(with_program tree
(with_program find
it "creates all pack objects" && {
WITH_SNAPSHOT="$snapshot/with-objects-dir-success-tree" \
expect_run $SUCCESSFULLY tree
expect_run_sh $SUCCESSFULLY 'find . -type f | sort'
}
)
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,54 +1,26 @@
.
├── 0e
│   └── ad45fc727edcf5cadca25ef922284f32bb6fc1
├── 15
│   └── 926d8d6d17d1cbdf7f03c457e8ff983270f363
├── 18
│   └── bd3fc20b0565f94bce0a3e94b6a83b26b88627
├── 1d
│   └── fd336d2290794b0b1f80d98af33f725da6f42d
├── 2b
│   └── 621c1a3aac23b8258885a9b4658d9ac993742f
├── 2c
│   └── 1e59ee54facb7d72c0061d06b9fe3889f357a9
├── 2d
│   └── ad8b277db3a95919bd904133d7e7cc3e323cb9
├── 3a
│   └── b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
├── 3d
│   └── 650a1c41a4529863818fd613b95e83668bbfc1
├── 41
│   └── 97ce3c6d943759e1088a0298b64571b4bc725a
├── 50
│   └── 1b297447a8255d3533c6858bb692575cdefaa0
├── 5d
│   └── e2eda652f29103c0d160f8c05d7e83b653a157
├── 66
│   └── 74d310d179400358d581f9725cbd4a2c32e3bf
├── 68
│   └── b95733c796b12571fb1f656062a15a78e7dcf4
├── 83
│   └── d9602eccfc733a550812ce492d4caa0af625c8
├── 84
│   ├── 26f672fc65239135b1f1580bb79ecb16fd05f0
│   └── 81dbefa2fb9398a673fe1f48dc480c1f558890
├── 85
│   └── 48234cfc7b4f0c9475d24d4c386783533a8034
├── 88
│   └── 58983d81b0eef76eb55d21a0d96b7b16846eca
├── af
│   └── 4f6405296dec699321ca59d48583ffa0323b0e
├── b2
│   └── 025146d0718d953036352f8435cfa392b1d799
├── bb
│   └── a287531b3a845faa032a8fef3e6d70d185c89b
├── bd
│   └── 91890c62d85ec16aadd3fb991b3ad7a365adde
├── cb
│   └── 572206d9dac4ba52878e7e1a4a7028d85707ab
├── e2
│   └── 34c232ce0b8acef3f43fa34c036e68522b5612
└── e8
└── 00b9c207e17f9b11e321cc1fba5dfe08af4222

25 directories, 26 files
./0e/ad45fc727edcf5cadca25ef922284f32bb6fc1
./15/926d8d6d17d1cbdf7f03c457e8ff983270f363
./18/bd3fc20b0565f94bce0a3e94b6a83b26b88627
./1d/fd336d2290794b0b1f80d98af33f725da6f42d
./2b/621c1a3aac23b8258885a9b4658d9ac993742f
./2c/1e59ee54facb7d72c0061d06b9fe3889f357a9
./2d/ad8b277db3a95919bd904133d7e7cc3e323cb9
./3a/b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
./3d/650a1c41a4529863818fd613b95e83668bbfc1
./41/97ce3c6d943759e1088a0298b64571b4bc725a
./50/1b297447a8255d3533c6858bb692575cdefaa0
./5d/e2eda652f29103c0d160f8c05d7e83b653a157
./66/74d310d179400358d581f9725cbd4a2c32e3bf
./68/b95733c796b12571fb1f656062a15a78e7dcf4
./83/d9602eccfc733a550812ce492d4caa0af625c8
./84/26f672fc65239135b1f1580bb79ecb16fd05f0
./84/81dbefa2fb9398a673fe1f48dc480c1f558890
./85/48234cfc7b4f0c9475d24d4c386783533a8034
./88/58983d81b0eef76eb55d21a0d96b7b16846eca
./af/4f6405296dec699321ca59d48583ffa0323b0e
./b2/025146d0718d953036352f8435cfa392b1d799
./bb/a287531b3a845faa032a8fef3e6d70d185c89b
./bd/91890c62d85ec16aadd3fb991b3ad7a365adde
./cb/572206d9dac4ba52878e7e1a4a7028d85707ab
./e2/34c232ce0b8acef3f43fa34c036e68522b5612
./e8/00b9c207e17f9b11e321cc1fba5dfe08af4222
Original file line number Diff line number Diff line change
@@ -1,54 +1,26 @@
.
├── 0e
│   └── ad45fc727edcf5cadca25ef922284f32bb6fc1
├── 15
│   └── 926d8d6d17d1cbdf7f03c457e8ff983270f363
├── 18
│   └── bd3fc20b0565f94bce0a3e94b6a83b26b88627
├── 1d
│   └── fd336d2290794b0b1f80d98af33f725da6f42d
├── 2b
│   └── 621c1a3aac23b8258885a9b4658d9ac993742f
├── 2c
│   └── 1e59ee54facb7d72c0061d06b9fe3889f357a9
├── 2d
│   └── ad8b277db3a95919bd904133d7e7cc3e323cb9
├── 3a
│   └── b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
├── 3d
│   └── 650a1c41a4529863818fd613b95e83668bbfc1
├── 41
│   └── 97ce3c6d943759e1088a0298b64571b4bc725a
├── 50
│   └── 1b297447a8255d3533c6858bb692575cdefaa0
├── 5d
│   └── e2eda652f29103c0d160f8c05d7e83b653a157
├── 66
│   └── 74d310d179400358d581f9725cbd4a2c32e3bf
├── 68
│   └── b95733c796b12571fb1f656062a15a78e7dcf4
├── 83
│   └── d9602eccfc733a550812ce492d4caa0af625c8
├── 84
│   ├── 26f672fc65239135b1f1580bb79ecb16fd05f0
│   └── 81dbefa2fb9398a673fe1f48dc480c1f558890
├── 85
│   └── 48234cfc7b4f0c9475d24d4c386783533a8034
├── 88
│   └── 58983d81b0eef76eb55d21a0d96b7b16846eca
├── af
│   └── 4f6405296dec699321ca59d48583ffa0323b0e
├── b2
│   └── 025146d0718d953036352f8435cfa392b1d799
├── bb
│   └── a287531b3a845faa032a8fef3e6d70d185c89b
├── bd
│   └── 91890c62d85ec16aadd3fb991b3ad7a365adde
├── cb
│   └── 572206d9dac4ba52878e7e1a4a7028d85707ab
├── e2
│   └── 34c232ce0b8acef3f43fa34c036e68522b5612
└── e8
└── 00b9c207e17f9b11e321cc1fba5dfe08af4222

25 directories, 26 files
./0e/ad45fc727edcf5cadca25ef922284f32bb6fc1
./15/926d8d6d17d1cbdf7f03c457e8ff983270f363
./18/bd3fc20b0565f94bce0a3e94b6a83b26b88627
./1d/fd336d2290794b0b1f80d98af33f725da6f42d
./2b/621c1a3aac23b8258885a9b4658d9ac993742f
./2c/1e59ee54facb7d72c0061d06b9fe3889f357a9
./2d/ad8b277db3a95919bd904133d7e7cc3e323cb9
./3a/b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
./3d/650a1c41a4529863818fd613b95e83668bbfc1
./41/97ce3c6d943759e1088a0298b64571b4bc725a
./50/1b297447a8255d3533c6858bb692575cdefaa0
./5d/e2eda652f29103c0d160f8c05d7e83b653a157
./66/74d310d179400358d581f9725cbd4a2c32e3bf
./68/b95733c796b12571fb1f656062a15a78e7dcf4
./83/d9602eccfc733a550812ce492d4caa0af625c8
./84/26f672fc65239135b1f1580bb79ecb16fd05f0
./84/81dbefa2fb9398a673fe1f48dc480c1f558890
./85/48234cfc7b4f0c9475d24d4c386783533a8034
./88/58983d81b0eef76eb55d21a0d96b7b16846eca
./af/4f6405296dec699321ca59d48583ffa0323b0e
./b2/025146d0718d953036352f8435cfa392b1d799
./bb/a287531b3a845faa032a8fef3e6d70d185c89b
./bd/91890c62d85ec16aadd3fb991b3ad7a365adde
./cb/572206d9dac4ba52878e7e1a4a7028d85707ab
./e2/34c232ce0b8acef3f43fa34c036e68522b5612
./e8/00b9c207e17f9b11e321cc1fba5dfe08af4222
Original file line number Diff line number Diff line change
@@ -1,56 +1,27 @@
.
├── 0e
│   └── ad45fc727edcf5cadca25ef922284f32bb6fc1
├── 15
│   └── 926d8d6d17d1cbdf7f03c457e8ff983270f363
├── 18
│   └── bd3fc20b0565f94bce0a3e94b6a83b26b88627
├── 1d
│   └── fd336d2290794b0b1f80d98af33f725da6f42d
├── 2b
│   └── 621c1a3aac23b8258885a9b4658d9ac993742f
├── 2c
│   └── 1e59ee54facb7d72c0061d06b9fe3889f357a9
├── 2d
│   └── ad8b277db3a95919bd904133d7e7cc3e323cb9
├── 3a
│   └── b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
├── 3d
│   └── 650a1c41a4529863818fd613b95e83668bbfc1
├── 41
│   └── 97ce3c6d943759e1088a0298b64571b4bc725a
├── 50
│   └── 1b297447a8255d3533c6858bb692575cdefaa0
├── 5d
│   └── e2eda652f29103c0d160f8c05d7e83b653a157
├── 66
│   └── 74d310d179400358d581f9725cbd4a2c32e3bf
├── 68
│   └── b95733c796b12571fb1f656062a15a78e7dcf4
├── 83
│   └── d9602eccfc733a550812ce492d4caa0af625c8
├── 84
│   ├── 26f672fc65239135b1f1580bb79ecb16fd05f0
│   └── 81dbefa2fb9398a673fe1f48dc480c1f558890
├── 85
│   └── 48234cfc7b4f0c9475d24d4c386783533a8034
├── 88
│   └── 58983d81b0eef76eb55d21a0d96b7b16846eca
├── a2
│   └── 9ebd0e0fcbcd2a0842dd44cc7c22a90a310a3a
├── af
│   └── 4f6405296dec699321ca59d48583ffa0323b0e
├── b2
│   └── 025146d0718d953036352f8435cfa392b1d799
├── bb
│   └── a287531b3a845faa032a8fef3e6d70d185c89b
├── bd
│   └── 91890c62d85ec16aadd3fb991b3ad7a365adde
├── cb
│   └── 572206d9dac4ba52878e7e1a4a7028d85707ab
├── e2
│   └── 34c232ce0b8acef3f43fa34c036e68522b5612
└── e8
└── 00b9c207e17f9b11e321cc1fba5dfe08af4222

26 directories, 27 files
./0e/ad45fc727edcf5cadca25ef922284f32bb6fc1
./15/926d8d6d17d1cbdf7f03c457e8ff983270f363
./18/bd3fc20b0565f94bce0a3e94b6a83b26b88627
./1d/fd336d2290794b0b1f80d98af33f725da6f42d
./2b/621c1a3aac23b8258885a9b4658d9ac993742f
./2c/1e59ee54facb7d72c0061d06b9fe3889f357a9
./2d/ad8b277db3a95919bd904133d7e7cc3e323cb9
./3a/b660ad62dd7c8c8bd637aa9bc1c2843a8439fe
./3d/650a1c41a4529863818fd613b95e83668bbfc1
./41/97ce3c6d943759e1088a0298b64571b4bc725a
./50/1b297447a8255d3533c6858bb692575cdefaa0
./5d/e2eda652f29103c0d160f8c05d7e83b653a157
./66/74d310d179400358d581f9725cbd4a2c32e3bf
./68/b95733c796b12571fb1f656062a15a78e7dcf4
./83/d9602eccfc733a550812ce492d4caa0af625c8
./84/26f672fc65239135b1f1580bb79ecb16fd05f0
./84/81dbefa2fb9398a673fe1f48dc480c1f558890
./85/48234cfc7b4f0c9475d24d4c386783533a8034
./88/58983d81b0eef76eb55d21a0d96b7b16846eca
./a2/9ebd0e0fcbcd2a0842dd44cc7c22a90a310a3a
./af/4f6405296dec699321ca59d48583ffa0323b0e
./b2/025146d0718d953036352f8435cfa392b1d799
./bb/a287531b3a845faa032a8fef3e6d70d185c89b
./bd/91890c62d85ec16aadd3fb991b3ad7a365adde
./cb/572206d9dac4ba52878e7e1a4a7028d85707ab
./e2/34c232ce0b8acef3f43fa34c036e68522b5612
./e8/00b9c207e17f9b11e321cc1fba5dfe08af4222
Loading

0 comments on commit 3c1bfd5

Please sign in to comment.