From 051b8a3456d64f4bbeed31f61eda64133770b0c9 Mon Sep 17 00:00:00 2001 From: Shubham Vasudeo Desai Date: Sat, 11 Apr 2026 18:58:28 -0400 Subject: [PATCH 1/2] testcases printing --- .github/workflows/macos.yml | 56 +++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 18aaeaae646..6b2e0540b07 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -6,9 +6,10 @@ name: macOS on: push: branches: - - main - - releasebranch_* + - priotestci pull_request: + branches: + - priotestci env: CACHE_NUMBER: 0 concurrency: @@ -104,6 +105,22 @@ jobs: @.github/workflows/pytest_args_parallel.txt \ --junitxml=pytest.xdist.junit.xml \ -k 'not testsuite' + + - name: Log parallel test list + if: always() + shell: micromamba-shell {0} + run: | + PYTHONPATH="$(grass --config python_path):${PYTHONPATH}" + LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}" + export PYTHONPATH LD_LIBRARY_PATH + pytest --collect-only -q \ + @.github/workflows/pytest_args_parallel.txt \ + -k 'not testsuite' 2>/dev/null \ + | grep -E '\.py::' | sort > /tmp/original_parallel_tests.txt + echo "Parallel tests: $(wc -l < /tmp/original_parallel_tests.txt)" + mkdir -p artifacts/original + cp /tmp/original_parallel_tests.txt artifacts/original/ + - name: Run pytest with a single worker (for tests marked with needs_solo_run) shell: micromamba-shell {0} run: | @@ -116,6 +133,7 @@ jobs: @.github/workflows/pytest_args_not_parallel.txt \ --junitxml=pytest.needs_solo_run.junit.xml \ -k 'not testsuite' + - name: Run pytest with a single worker (for gunittest-based tests) shell: micromamba-shell {0} run: | @@ -126,6 +144,21 @@ jobs: pytest \ @.github/workflows/pytest_args_gunittest.txt \ --junitxml=pytest.gunittest.junit.xml + + - name: Log gunittest test list + if: always() + shell: micromamba-shell {0} + run: | + PYTHONPATH="$(grass --config python_path):${PYTHONPATH}" + LD_LIBRARY_PATH="$(grass --config path)/lib:${LD_LIBRARY_PATH}" + export PYTHONPATH LD_LIBRARY_PATH + pytest --collect-only -q \ + @.github/workflows/pytest_args_gunittest.txt \ + 2>/dev/null \ + | grep -E '\.py::' | sort > /tmp/original_gunittest_tests.txt + echo "Gunittest tests: $(wc -l < /tmp/original_gunittest_tests.txt)" + mkdir -p artifacts/original + cp /tmp/original_gunittest_tests.txt artifacts/original/ - name: Upload test results to Codecov if: ${{ !cancelled() }} @@ -166,6 +199,25 @@ jobs: SAMPLE_DATA_URL: "file://${{ github.workspace }}/sample-data/\ nc_spm_full_v2alpha2.tar.gz" + - name: Log thorough test list + if: always() + shell: micromamba-shell {0} + run: | + find . -type f \( -path "*/testsuite/*.py" -o -path "*/testsuite/*.sh" \) \ + -not -path "./artifacts/*" \ + | sed 's|^\./||' | sort > /tmp/original_thorough_tests.txt + echo "Thorough tests: $(wc -l < /tmp/original_thorough_tests.txt)" + mkdir -p artifacts/original + cp /tmp/original_thorough_tests.txt artifacts/original/ + + - name: Upload original test lists + if: always() + uses: actions/upload-artifact@v4 + with: + name: original_test_lists + path: artifacts/original/ + retention-days: 7 + - name: Make HTML test report available if: ${{ !cancelled() }} uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 From 31375eba1fb7bb4a82a47330eea30bcb68698e81 Mon Sep 17 00:00:00 2001 From: Shubham Vasudeo Desai Date: Sun, 12 Apr 2026 15:38:12 -0400 Subject: [PATCH 2/2] rewrote log logic --- .github/workflows/macos.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6b2e0540b07..bd6807c77fc 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -203,12 +203,18 @@ jobs: if: always() shell: micromamba-shell {0} run: | - find . -type f \( -path "*/testsuite/*.py" -o -path "*/testsuite/*.sh" \) \ - -not -path "./artifacts/*" \ - | sed 's|^\./||' | sort > /tmp/original_thorough_tests.txt - echo "Thorough tests: $(wc -l < /tmp/original_thorough_tests.txt)" mkdir -p artifacts/original - cp /tmp/original_thorough_tests.txt artifacts/original/ + + # Capture what test_thorough.sh actually executed (from testreport keyvalue files) + find . -path "./testreport/*/test_keyvalue_result.txt" -type f \ + | while IFS= read -r kv; do + file="$(grep -E '^file=' "$kv" | head -n 1 | cut -d= -f2- || true)" + if [[ -n "${file}" ]]; then + echo "${file}" | sed 's|^\./||' + fi + done | sort -u > artifacts/original/original_thorough_executed.txt + + echo "Actually executed: $(wc -l < artifacts/original/original_thorough_executed.txt)" - name: Upload original test lists if: always()