diff options
author | Nobuyoshi Nakada <[email protected]> | 2025-06-06 14:16:22 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2025-06-20 17:40:59 +0900 |
commit | 896f9f6328aa50c1f7ccbaf4103626d0701680b6 () | |
tree | 9d810b3f66c5f9179673a7405425717cfeb60e2e | |
parent | 7a735c4861166850fff21aabc5aa1bbde5e1cb07 (diff) |
CI: Run Launchable in the build directory
As well as compilers/entrypoint.sh.
-rw-r--r-- | ./actions/launchable/setup/action.yml | 79 |
1 files changed, 26 insertions, 53 deletions
@@ -57,12 +57,12 @@ inputs: outputs: stdout_report_path: - value: ${{ steps.variables.outputs.stdout_report_path }} description: >- Report file path for standard output. stderr_report_path: - value: ${{ steps.variables.outputs.stderr_report_path }} description: >- Report file path for standard error. @@ -114,6 +114,8 @@ runs: echo test_all_report_file='launchable_test_all_report.json' >> $_OUTPUT echo btest_report_file='launchable_btest_report.json' >> $_OUTPUT echo test_spec_report_dir='launchable_test_spec_report' >> $_OUTPUT if: steps.enable-launchable.outputs.enable-launchable - name: Set environment variables for Launchable @@ -198,7 +200,10 @@ runs: fi if launchable_setup test_spec; then echo "SPECOPTS=${SPECOPTS:$SPECOPTS }--launchable-test-reports=${test_spec_report_dir}" >> $_ENV fi if: steps.enable-launchable.outputs.enable-launchable env: test_all_enabled: ${{ steps.global.outputs.test_all_enabled }} @@ -208,6 +213,14 @@ runs: btest_report_file: ${{ steps.global.outputs.btest_report_file }} test_spec_report_dir: ${{ steps.global.outputs.test_spec_report_dir }} - name: Clean up test results in Launchable uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0 with: @@ -225,52 +238,11 @@ runs: btest_report_file: ${{ steps.global.outputs.btest_report_file }} test_spec_report_dir: ${{ steps.global.outputs.test_spec_report_dir }} - - name: Variables to report Launchable - id: variables - shell: bash - working-directory: ${{ inputs.srcdir }} - run: | - set -x - : # report-path from srcdir - if [ "${srcdir}" = "${{ .workspace }}" ]; then - dir= - else - # srcdir must be equal to or under workspace - dir=$(echo ${srcdir:+${srcdir}/} | sed 's:[^/][^/]*/:../:g') - fi - if [ "${test_all_enabled}" = "true" ]; then - test_report_path="${dir}${builddir:+${builddir}/}${test_all_report_file}" - echo test_report_path="${test_report_path}" >> $_OUTPUT - fi - if [ "${btest_enabled}" = "true" ]; then - btest_report_path="${dir}${builddir:+${builddir}/}${btest_report_file}" - echo btest_report_path="${btest_report_path}" >> $_OUTPUT - fi - if [ "${test_spec_enabled}" = "true" ]; then - test_spec_report_path="${dir}${builddir:+${builddir}/}${test_spec_report_dir}" - mkdir "${test_spec_report_path}" - echo test_spec_report_path="${test_spec_report_path}" >> $_OUTPUT - fi - stdout_report_path="${dir}${builddir:+${builddir}/}launchable_stdout.log" - stderr_report_path="${dir}${builddir:+${builddir}/}launchable_stderr.log" - echo stdout_report_path="${stdout_report_path}" >> $_OUTPUT - echo stderr_report_path="${stderr_report_path}" >> $_OUTPUT - if: steps.enable-launchable.outputs.enable-launchable - env: - srcdir: ${{ inputs.srcdir }} - builddir: ${{ inputs.builddir }} - test_all_enabled: ${{ steps.global.outputs.test_all_enabled }} - btest_enabled: ${{ steps.global.outputs.btest_enabled }} - test_spec_enabled: ${{ steps.global.outputs.test_spec_enabled }} - test_all_report_file: ${{ steps.global.outputs.test_all_report_file }} - btest_report_file: ${{ steps.global.outputs.btest_report_file }} - test_spec_report_dir: ${{ steps.global.outputs.test_spec_report_dir }} - - name: Record test results in Launchable uses: gacts/run-and-post-run@674528335da98a7afc80915ff2b4b860a0b3553a # v1.4.0 with: shell: bash - working-directory: ${{ inputs.srcdir }} post: | if [[ "${test_all_enabled}" = "true" ]]; then \ launchable record attachment \ @@ -279,7 +251,7 @@ runs: "${stderr_report_path}"; \ launchable record tests \ --session "${test_all_session}" \ - raw "${test_report_path}" || true; \ fi if [[ "${btest_enabled}" = "true" ]]; then \ @@ -289,7 +261,7 @@ runs: "${stderr_report_path}"; \ launchable record tests \ --session "${btest_session}" \ - raw "${btest_report_path}" || true; \ fi if [[ "${test_spec_enabled}" = "true" ]]; then \ @@ -299,18 +271,19 @@ runs: "${stderr_report_path}"; \ launchable record tests \ --session "${test_spec_session}" \ - raw ${test_spec_report_path}/* || true; \ fi - if: ${{ always() && steps.enable-launchable.outputs.enable-launchable }} env: - test_report_path: ${{ steps.variables.outputs.test_report_path }} - btest_report_path: ${{ steps.variables.outputs.btest_report_path }} - test_spec_report_path: ${{ steps.variables.outputs.test_spec_report_path }} test_all_enabled: ${{ steps.global.outputs.test_all_enabled }} btest_enabled: ${{ steps.global.outputs.btest_enabled }} test_spec_enabled: ${{ steps.global.outputs.test_spec_enabled }} test_all_session: ${{ steps.setup-launchable.outputs.test_all_session }} btest_session: ${{ steps.setup-launchable.outputs.btest_session }} test_spec_session: ${{ steps.setup-launchable.outputs.test_spec_session }} - stdout_report_path: ${{ steps.variables.outputs.stdout_report_path }} - stderr_report_path: ${{ steps.variables.outputs.stderr_report_path }} |