@@ -146,6 +146,7 @@ runs:
146146 if : steps.enable-launchable.outputs.enable-launchable && startsWith(inputs.os, 'macos')
147147
148148 - name : Set up Launchable
149+ id : setup-launchable
149150 shell : bash
150151 working-directory : ${{ inputs.srcdir }}
151152 run : |
@@ -235,6 +236,38 @@ runs:
235236 btest_report_file : ${{ steps.global.outputs.btest_report_file }}
236237 test_spec_report_dir : ${{ steps.global.outputs.test_spec_report_dir }}
237238
239+ - name : Clean up session files in Launchable
240+ uses : gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
241+ with :
242+ shell : bash
243+ working-directory : ${{ inputs.srcdir }}
244+ post : |
245+ rm -f "${test_all_session_file}"
246+ rm -f "${btest_session_file}"
247+ rm -f "${test_spec_session_file}
248+ if : always() && steps.setup-launchable.outcome == 'success'
249+ env :
250+ test_all_session_file : ${{ steps.global.outputs.test_all_session_file }}
251+ btest_session_file : ${{ steps.global.outputs.btest_session_file }}
252+ test_spec_session_file : ${{ steps.global.outputs.test_spec_session_file }}
253+
254+ - name : Clean up test results in Launchable
255+ uses : gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0
256+ with :
257+ shell : bash
258+ working-directory : ${{ inputs.builddir }}
259+ post : |
260+ rm -f "${test_all_report_file}"
261+ rm -f "${btest_report_file}"
262+ rm -fr "${test_spec_report_dir}"
263+ rm -f launchable_stdout.log
264+ rm -f launchable_stderr.log
265+ if : always() && steps.setup-launchable.outcome == 'success'
266+ env :
267+ test_all_report_file : ${{ steps.global.outputs.test_all_report_file }}
268+ btest_report_file : ${{ steps.global.outputs.btest_report_file }}
269+ test_spec_report_dir : ${{ steps.global.outputs.test_spec_report_dir }}
270+
238271 - name : Variables to report Launchable
239272 id : variables
240273 shell : bash
@@ -311,15 +344,6 @@ runs:
311344 --session "$(cat "${test_spec_session_file}")" \
312345 raw ${test_spec_report_path}/* || true; \
313346 fi
314-
315- rm -f "${test_all_session_file}"
316- rm -f "${btest_session_file}"
317- rm -f "${test_spec_session_file}"
318- rm -f "${test_report_path}"
319- rm -f "${btest_report_path}"
320- rm -fr "${test_spec_report_path}"
321- rm -f "${stdout_report_path}"
322- rm -f "${stderr_report_path}"
323347 if : ${{ always() && steps.enable-launchable.outputs.enable-launchable }}
324348 env :
325349 test_report_path : ${{ steps.variables.outputs.test_report_path }}
0 commit comments