From f1a171b9b1d15a7a859446e5e9378c21a9b5f69a Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Thu, 14 Nov 2024 02:01:09 -0500 Subject: [PATCH] Update a journey test `tree` use delcaration to `find` This also stops installing `tree` on CI. The `tree` package provides the `tree` command, which is useful but does not currently appear to be used anywhere. At one time, various journey tests had used it to generate output for comparison, and this usage/dependency was declared with `with_program` in 688280b, which was also when the first command to install it was added to CI. Later, `tree` was found to be unportable or otherwise unsuitable in the counts it output, and all uses of it were replaced with `find` in 3c1bfd5 (#861). At that point, most `with_program` declarations for it were changed to `find`, but one of them in the `ein` journey tests was not replaced at that time. That test does use `find` (and not `tree`), and should declare its use of `find` rather than `tree`. This commit makes that change. One benefit of doing so is that it is possible to run the tests on a CI (or other) system without `tree` without skipping any tests, so this also removes it from the lists of packages to install with `apt-get` and `brew` in CI jobs. --- .github/workflows/ci.yml | 6 +++--- tests/journey/ein.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73ca728ccdc..e7efbdef8c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: Setup dependencies - run: sudo apt-get install -y --no-install-recommends liblzma-dev tree + run: sudo apt-get install -y --no-install-recommends liblzma-dev - uses: extractions/setup-just@v2 - uses: taiki-e/install-action@v2 with: @@ -91,8 +91,8 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Setup dependencies (macos) if: startsWith(matrix.os, 'macos') - run: brew install tree openssl gnu-sed - - name: "cargo check default features" + run: brew install openssl gnu-sed + - name: cargo check default features if: startsWith(matrix.os, 'windows') run: cargo check --workspace --bins --examples - uses: taiki-e/install-action@v2 diff --git a/tests/journey/ein.sh b/tests/journey/ein.sh index 1546209c2e6..408256e5178 100644 --- a/tests/journey/ein.sh +++ b/tests/journey/ein.sh @@ -28,7 +28,7 @@ title "Porcelain ${kind}" ) ) snapshot="$snapshot/porcelain" - (with_program tree + (with_program find (when "using the 'tool' subcommand" title "ein tool" (with "a repo with a tiny commit history"