Skip to content

Commit 833fbe5

Browse files
committed
Merge branch 'ci/fixes'
2 parents e86e060 + 4b33273 commit 833fbe5

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

.github/scripts/generate_missing_junits.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,20 @@ def main():
199199
results_root = Path(sys.argv[2]).resolve()
200200
out_root = Path(sys.argv[3]).resolve()
201201

202+
# Validate inputs
203+
if not build_root.is_dir():
204+
print(f"ERROR: Build artifacts directory not found: {build_root}", file=sys.stderr)
205+
return 2
206+
if not results_root.is_dir():
207+
print(f"ERROR: Test results directory not found: {results_root}", file=sys.stderr)
208+
return 2
209+
# Ensure output directory exists
210+
try:
211+
out_root.mkdir(parents=True, exist_ok=True)
212+
except Exception as e:
213+
print(f"ERROR: Failed to create output directory {out_root}: {e}", file=sys.stderr)
214+
return 2
215+
202216
# Read matrices from environment variables injected by workflow
203217
hw_enabled = (os.environ.get("HW_TESTS_ENABLED", "false").lower() == "true")
204218
wokwi_enabled = (os.environ.get("WOKWI_TESTS_ENABLED", "false").lower() == "true")

.github/workflows/tests_results.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ jobs:
6868
echo "qemu_tests_enabled=$qemu_tests_enabled" >> $GITHUB_OUTPUT
6969
echo "qemu_targets=$qemu_targets" >> $GITHUB_OUTPUT
7070
echo "qemu_types=$qemu_types" >> $GITHUB_OUTPUT
71-
7271
echo "original_event=$original_event" >> $GITHUB_OUTPUT
7372
echo "original_action=$original_action" >> $GITHUB_OUTPUT
7473
echo "original_sha=$original_sha" >> $GITHUB_OUTPUT
@@ -124,6 +123,12 @@ jobs:
124123
run_id: ${{ github.event.workflow_run.id }}
125124
path: ./artifacts
126125

126+
- name: Download and Extract Artifacts
127+
uses: dawidd6/action-download-artifact@07ab29fd4a977ae4d2b275087cf67563dfdf0295 # v9
128+
with:
129+
run_id: ${{ needs.get-artifacts.outputs.original_run_id }}
130+
path: ./build_artifacts
131+
127132
- name: Generate JUnit files for missing runs
128133
env:
129134
GH_TOKEN: ${{ github.token }}
@@ -137,9 +142,11 @@ jobs:
137142
QEMU_TARGETS: ${{ needs.get-artifacts.outputs.qemu_targets }}
138143
QEMU_TYPES: ${{ needs.get-artifacts.outputs.qemu_types }}
139144
run: |
145+
ls -laR ./artifacts
146+
echo "======================================================================"
147+
ls -laR ./build_artifacts
148+
echo "======================================================================"
140149
pip3 install pyyaml
141-
mkdir -p build_artifacts test_errors
142-
gh run download ${{ needs.get-artifacts.outputs.original_run_id }} --name "test-bin-*" --dir ./build_artifacts || true
143150
wget https://raw.githubusercontent.com/${{ github.repository }}/master/.github/scripts/generate_missing_junits.py -O ./generate_missing_junits.py
144151
python3 ./generate_missing_junits.py ./build_artifacts ./artifacts ./test_errors
145152

0 commit comments

Comments
 (0)