Skip to content

Commit 86eb5f9

Browse files
committed
CI: Trap launchable_record_test in the parent process
1 parent 43472a3 commit 86eb5f9

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

.github/actions/compilers/entrypoint.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,7 @@ setup_launchable() {
8585
export LAUNCHABLE_SESSION_DIR=${builddir}
8686
local github_ref="${GITHUB_REF//\//_}"
8787
local build_name="${github_ref}"_"${GITHUB_PR_HEAD_SHA}"
88-
btest_report_path='launchable_bootstraptest.json'
89-
test_report_path='launchable_test_all.json'
90-
test_spec_report_path='launchable_test_spec_report'
91-
test_all_session_file='launchable_test_all_session.txt'
92-
btest_session_file='launchable_btest_session.txt'
93-
test_spec_session_file='launchable_test_spec_session.txt'
9488
btests+=--launchable-test-reports="${btest_report_path}"
95-
echo "::group::Setup Launchable"
9689
launchable record build --name "${build_name}" || true
9790
launchable record session \
9891
--build "${build_name}" \
@@ -135,8 +128,6 @@ setup_launchable() {
135128
> "${builddir}"/${test_spec_session_file} \
136129
|| true
137130
fi
138-
echo "::endgroup::"
139-
trap launchable_record_test EXIT
140131
}
141132
launchable_record_test() {
142133
pushd "${builddir}"
@@ -147,10 +138,19 @@ launchable_record_test() {
147138
fi
148139
}
149140
if [ "$LAUNCHABLE_ENABLED" = "true" ]; then
141+
echo "::group::Setup Launchable"
142+
btest_report_path='launchable_bootstraptest.json'
143+
test_report_path='launchable_test_all.json'
144+
test_spec_report_path='launchable_test_spec_report'
145+
test_all_session_file='launchable_test_all_session.txt'
146+
btest_session_file='launchable_btest_session.txt'
147+
test_spec_session_file='launchable_test_spec_session.txt'
150148
setup_launchable & setup_pid=$!
151149
(sleep 180; kill "$setup_pid" 2> /dev/null) & sleep_pid=$!
152150
wait -f "$setup_pid"
153151
kill "$sleep_pid" 2> /dev/null
152+
echo "::endgroup::"
153+
trap launchable_record_test EXIT
154154
fi
155155

156156
pushd ${builddir}

0 commit comments

Comments
 (0)