From fffd1c98850e9cf63780befce3c98e60de5b5042 Mon Sep 17 00:00:00 2001 From: Luke Gallagher Date: Fri, 29 Nov 2024 10:44:54 +1100 Subject: [PATCH] Update cli test build Add step to install tools in default path before running tests (#242). --- .github/workflows/commit.yml | 5 +++++ test/cli/setup.sh | 6 ++++-- test/cli/test_count_postings.sh | 2 -- test/cli/test_taily_stats.sh | 2 -- test/cli/test_wand_data.sh | 3 --- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 042f9df0..95b11a5c 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -70,6 +70,11 @@ jobs: working-directory: ${{runner.workspace}}/build run: cmake --build . --config Debug -- -j 4 + - name: Install + shell: bash + working-directory: ${{runner.workspace}}/build + run: sudo make install + - name: Test CLI shell: bash working-directory: ${{runner.workspace}}/build diff --git a/test/cli/setup.sh b/test/cli/setup.sh index 0f7f6a78..d180053a 100644 --- a/test/cli/setup.sh +++ b/test/cli/setup.sh @@ -3,8 +3,10 @@ # This script should be executed within the build directory that is directly # in the project directory, e.g., /path/to/pisa/build -PISA_BIN="./bin" -export PATH="$PISA_BIN:$PATH" +command -v compress_inverted_index >/dev/null 2>&1 || { + echo >&2 "tools not available in default path" + exit 1 +} test_dir=${TEST_DIR:-../test} diff --git a/test/cli/test_count_postings.sh b/test/cli/test_count_postings.sh index 67f3deba..5f78dbf4 100644 --- a/test/cli/test_count_postings.sh +++ b/test/cli/test_count_postings.sh @@ -2,8 +2,6 @@ set +x -PISA_BIN="bin" -export PATH="$PISA_BIN:$PATH" DIR=$(dirname "$0") @test "Extract posting counts" { diff --git a/test/cli/test_taily_stats.sh b/test/cli/test_taily_stats.sh index 3bb15da2..d0d5e377 100644 --- a/test/cli/test_taily_stats.sh +++ b/test/cli/test_taily_stats.sh @@ -2,8 +2,6 @@ set +x -PISA_BIN="bin" -export PATH="$PISA_BIN:$PATH" DIR=$(dirname "$0") echo_int () { diff --git a/test/cli/test_wand_data.sh b/test/cli/test_wand_data.sh index e843149a..ec4504d9 100644 --- a/test/cli/test_wand_data.sh +++ b/test/cli/test_wand_data.sh @@ -2,9 +2,6 @@ set +x -PISA_BIN="bin" -export PATH="$PISA_BIN:$PATH" - queries=$(cat <