From 4f5892071fbaf3a548c8da1a572a47777930af7e Mon Sep 17 00:00:00 2001 From: Meliox Date: Sat, 8 Aug 2026 23:37:09 +0200 Subject: [PATCH] refactor: move CI test scripts from src/scripts/test/ to build/test/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test scripts are not installed — they are CI/dev tooling and belong alongside build/gen-rules.sh. Update workflow references and fix the SRC_DIR path depth in build/test/test-syntax.sh (../ -> ../..). --- .github/workflows/validate-mods.yml | 6 +++--- .github/workflows/weekly-patch-test.yml | 4 ++-- {src/scripts => build}/test/fetch-proxmox-files.sh | 0 {src/scripts => build}/test/test-patches.sh | 2 +- {src/scripts => build}/test/test-syntax.sh | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) rename {src/scripts => build}/test/fetch-proxmox-files.sh (100%) rename {src/scripts => build}/test/test-patches.sh (99%) rename {src/scripts => build}/test/test-syntax.sh (97%) diff --git a/.github/workflows/validate-mods.yml b/.github/workflows/validate-mods.yml index a9c5b57..92085ba 100644 --- a/.github/workflows/validate-mods.yml +++ b/.github/workflows/validate-mods.yml @@ -32,13 +32,13 @@ jobs: path: deb - name: Fetch upstream Proxmox files - run: bash src/scripts/test/fetch-proxmox-files.sh + run: bash build/test/fetch-proxmox-files.sh - name: Install built package run: apt-get install -y ./deb/*.deb - name: Test all mods - run: bash src/scripts/test/test-patches.sh all + run: bash build/test/test-patches.sh all - name: Validate source syntax - run: bash src/scripts/test/test-syntax.sh all + run: bash build/test/test-syntax.sh all diff --git a/.github/workflows/weekly-patch-test.yml b/.github/workflows/weekly-patch-test.yml index ac73ad1..f234589 100644 --- a/.github/workflows/weekly-patch-test.yml +++ b/.github/workflows/weekly-patch-test.yml @@ -70,7 +70,7 @@ jobs: # ── Test ─────────────────────────────────────────────────────────────── - name: Fetch upstream Proxmox files - run: bash src/scripts/test/fetch-proxmox-files.sh + run: bash build/test/fetch-proxmox-files.sh - name: Install built package run: sudo apt-get install -y ../pve-mod_*.deb @@ -78,7 +78,7 @@ jobs: - name: Test mod run: | set -o pipefail - sudo bash src/scripts/test/test-patches.sh "${{ matrix.mod }}" 2>&1 | tee test-output.log + sudo bash build/test/test-patches.sh "${{ matrix.mod }}" 2>&1 | tee test-output.log - name: Report failure as issue if: failure() diff --git a/src/scripts/test/fetch-proxmox-files.sh b/build/test/fetch-proxmox-files.sh similarity index 100% rename from src/scripts/test/fetch-proxmox-files.sh rename to build/test/fetch-proxmox-files.sh diff --git a/src/scripts/test/test-patches.sh b/build/test/test-patches.sh similarity index 99% rename from src/scripts/test/test-patches.sh rename to build/test/test-patches.sh index 6e5f1f3..5a68e6f 100644 --- a/src/scripts/test/test-patches.sh +++ b/build/test/test-patches.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# src/scripts/test/test-patches.sh +# build/test/test-patches.sh # # Exercises pve-mod's patch engine against the installed Proxmox files. # diff --git a/src/scripts/test/test-syntax.sh b/build/test/test-syntax.sh similarity index 97% rename from src/scripts/test/test-syntax.sh rename to build/test/test-syntax.sh index a274bfe..8627d85 100644 --- a/src/scripts/test/test-syntax.sh +++ b/build/test/test-syntax.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# src/scripts/test/test-syntax.sh +# build/test/test-syntax.sh # # Validates source syntax for all mod files without requiring a running system. # @@ -16,7 +16,7 @@ set -u SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -SRC_DIR="${PVE_MOD_SRC_DIR:-$(cd "$SCRIPT_DIR/../../.." && pwd)/src/modules}" +SRC_DIR="${PVE_MOD_SRC_DIR:-$(cd "$SCRIPT_DIR/../.." && pwd)/src/modules}" info() { echo "[syntax] $*"; } warn() { echo "[syntax] WARNING: $*" >&2; }