6262 TEST_FILESET_SUFFIX='.txt'
6363 TEST_SUMMARY_FILE='gnu-result.json'
6464 TEST_FULL_SUMMARY_FILE='gnu-full-result.json'
65- outputs SUITE_LOG_FILE ROOT_SUITE_LOG_FILE SELINUX_SUITE_LOG_FILE SELINUX_ROOT_SUITE_LOG_FILE TEST_FILESET_PREFIX TEST_FILESET_SUFFIX TEST_LOGS_GLOB TEST_SUMMARY_FILE TEST_FULL_SUMMARY_FILE
65+ TEST_ROOT_FULL_SUMMARY_FILE='gnu-root-full-result.json'
66+ TEST_SELINUX_FULL_SUMMARY_FILE='selinux-gnu-full-result.json'
67+ TEST_SELINUX_ROOT_FULL_SUMMARY_FILE='selinux-root-gnu-full-result.json'
68+
69+ outputs SUITE_LOG_FILE ROOT_SUITE_LOG_FILE SELINUX_SUITE_LOG_FILE SELINUX_ROOT_SUITE_LOG_FILE TEST_FILESET_PREFIX TEST_FILESET_SUFFIX TEST_LOGS_GLOB TEST_SUMMARY_FILE TEST_FULL_SUMMARY_FILE TEST_ROOT_FULL_SUMMARY_FILE TEST_SELINUX_FULL_SUMMARY_FILE TEST_SELINUX_ROOT_FULL_SUMMARY_FILE
6670 - name : Checkout code (uutil)
6771 uses : actions/checkout@v4
6872 with :
@@ -189,6 +193,7 @@ jobs:
189193 - name : Selinux - Build for selinux tests
190194 run : |
191195 lima bash -c "cd ~/work/uutils/ && bash util/build-gnu.sh"
196+ lima bash -c "mkdir -p ~/work/gnu/tests-selinux/"
192197
193198 - name : Selinux - Run selinux tests
194199 run : |
@@ -197,16 +202,19 @@ jobs:
197202 lima cat /proc/filesystems
198203 lima bash -c "cd ~/work/uutils/ && bash util/run-gnu-test.sh \$(cat selinux-tests.txt)"
199204
200- - name : Selinux - Run selinux tests as root
205+ - name : Selinux - Extract testing info from individual logs into JSON
206+ shell : bash
207+ run : |
208+ lima bash -c "cd ~/work/gnu/ && python3 ../uutils/util/gnu-json-result.py tests > ~/work/gnu/tests-selinux/${{ steps.vars.outputs.TEST_SELINUX_FULL_SUMMARY_FILE }}"
209+
210+ - name : Selinux/root - Run selinux tests
201211 run : |
202212 lima bash -c "cd ~/work/uutils/ && CI=1 bash util/run-gnu-test.sh run-root \$(cat selinux-tests.txt)"
203213
204- - name : Selinux - Extract testing info from individual logs into JSON
214+ - name : Selinux/root - Extract testing info from individual logs into JSON
205215 shell : bash
206216 run : |
207- lima bash -c "mkdir -p ~/work/gnu/tests-selinux/"
208- lima bash -c "cd ~/work/gnu/ && python3 ../uutils/util/gnu-json-result.py tests"
209- lima bash -c "cd ~/work/gnu/ && python3 ../uutils/util/gnu-json-result.py tests > ~/work/gnu/tests-selinux/selinux-gnu-full-result.json && cat ~/work/gnu/tests-selinux/selinux-gnu-full-result.json"
217+ lima bash -c "cd ~/work/gnu/ && python3 ../uutils/util/gnu-json-result.py tests > ~/work/gnu/tests-selinux/${{ steps.vars.outputs.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }}"
210218
211219 - name : Selinux - Collect test logs and test results
212220 run : |
@@ -220,7 +228,8 @@ jobs:
220228 # Copy SELinux logs to the main test directory for integrated processing
221229 cp -f ${{ steps.vars.outputs.path_GNU_tests }}-selinux/test-suite.log ${{ steps.vars.outputs.path_GNU_tests }}/selinux-test-suite.log
222230 cp -f ${{ steps.vars.outputs.path_GNU_tests }}-selinux/test-suite-root.log ${{ steps.vars.outputs.path_GNU_tests }}/selinux-test-suite-root.log
223- cp -f ${{ steps.vars.outputs.path_GNU_tests }}-selinux/selinux-gnu-full-result.json ${{ steps.vars.outputs.path_GNU_tests }}/
231+ cp -f ${{ steps.vars.outputs.path_GNU_tests }}-selinux/${{ steps.vars.outputs.TEST_SELINUX_FULL_SUMMARY_FILE }} .
232+ cp -f ${{ steps.vars.outputs.path_GNU_tests }}-selinux/${{ steps.vars.outputs.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }} .
224233
225234 - name : Run GNU tests
226235 shell : bash
@@ -229,18 +238,27 @@ jobs:
229238 path_GNU='${{ steps.vars.outputs.path_GNU }}'
230239 path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
231240 bash "${path_UUTILS}/util/run-gnu-test.sh"
241+
242+ - name : Extract testing info from individual logs into JSON
243+ shell : bash
244+ run : |
245+ path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
246+ python ${path_UUTILS}/util/gnu-json-result.py ${{ steps.vars.outputs.path_GNU_tests }} > ${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }}
247+
232248 - name : Run GNU root tests
233249 shell : bash
234250 run : |
235251 ## Run GNU root tests
236252 path_GNU='${{ steps.vars.outputs.path_GNU }}'
237253 path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
238254 bash "${path_UUTILS}/util/run-gnu-test.sh" run-root
239- - name : Extract testing info from indiv logs into JSON
255+
256+ - name : Extract testing info from individual logs (run as root) into JSON
240257 shell : bash
241258 run : |
242259 path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
243- python ${path_UUTILS}/util/gnu-json-result.py ${{ steps.vars.outputs.path_GNU_tests }} > ${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }}
260+ python ${path_UUTILS}/util/gnu-json-result.py ${{ steps.vars.outputs.path_GNU_tests }} > ${{ steps.vars.outputs.TEST_ROOT_FULL_SUMMARY_FILE }}
261+
244262 - name : Extract/summarize testing info
245263 id : summary
246264 shell : bash
@@ -253,8 +271,8 @@ jobs:
253271 # Check if the file exists
254272 if test -f "${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }}"
255273 then
256- # Run the Python script to analyze the JSON data
257- eval $(python3 ${path_UUTILS}/util/analyze-gnu-results.py ${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }})
274+ # Look at all individual results and summarize
275+ eval $(python3 ${path_UUTILS}/util/analyze-gnu-results.py ${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }} ${{ steps.vars.outputs.TEST_ROOT_FULL_SUMMARY_FILE }} ${{ steps.vars.outputs.TEST_SELINUX_FULL_SUMMARY_FILE }} ${{ steps.vars.outputs.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }} )
258276
259277 if [[ "$TOTAL" -eq 0 || "$TOTAL" -eq 1 ]]; then
260278 echo "::error ::Failed to parse test results from '${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }}'; failing early"
@@ -307,6 +325,21 @@ jobs:
307325 with :
308326 name : gnu-full-result.json
309327 path : ${{ steps.vars.outputs.TEST_FULL_SUMMARY_FILE }}
328+ - name : Upload full json results
329+ uses : actions/upload-artifact@v4
330+ with :
331+ name : gnu-root-full-result.json
332+ path : ${{ steps.vars.outputs.TEST_ROOT_FULL_SUMMARY_FILE }}
333+ - name : Upload full json results
334+ uses : actions/upload-artifact@v4
335+ with :
336+ name : selinux-gnu-full-result.json
337+ path : ${{ steps.vars.outputs.TEST_SELINUX_FULL_SUMMARY_FILE }}
338+ - name : Upload full json results
339+ uses : actions/upload-artifact@v4
340+ with :
341+ name : selinux-root-gnu-full-result.json
342+ path : ${{ steps.vars.outputs.TEST_SELINUX_ROOT_FULL_SUMMARY_FILE }}
310343 - name : Compare test failures VS reference
311344 shell : bash
312345 run : |
0 commit comments