@@ -75,6 +75,18 @@ tests=''
7575spec_opts=' '
7676
7777# Launchable
78+ launchable_record_session () {
79+ launchable record session \
80+ --build " ${build_name} " \
81+ --flavor test_task=$1 \
82+ --flavor workflow=Compilations \
83+ --flavor with-gcc=" ${INPUT_WITH_GCC} " \
84+ --flavor CFLAGS=" ${INPUT_CFLAGS} " \
85+ --flavor CXXFLAGS=" ${INPUT_CXXFLAGS} " \
86+ --flavor optflags=" ${INPUT_OPTFLAGS} " \
87+ --flavor cppflags=" ${INPUT_CPPFLAGS} " \
88+ --test-suite ${2-$1 }
89+ }
7890setup_launchable () {
7991 pushd ${srcdir}
8092 # To prevent a slowdown in CI, disable request retries when the Launchable server is unstable.
@@ -86,43 +98,13 @@ setup_launchable() {
8698 local github_ref=" ${GITHUB_REF// \/ / _} "
8799 local build_name=" ${github_ref} " _" ${GITHUB_PR_HEAD_SHA} "
88100 launchable record build --name " ${build_name} " || true
89- btest_session=$( launchable record session \
90- --build " ${build_name} " \
91- --flavor test_task=test \
92- --flavor workflow=Compilations \
93- --flavor with-gcc=" ${INPUT_WITH_GCC} " \
94- --flavor CFLAGS=" ${INPUT_CFLAGS} " \
95- --flavor CXXFLAGS=" ${INPUT_CXXFLAGS} " \
96- --flavor optflags=" ${INPUT_OPTFLAGS} " \
97- --flavor cppflags=" ${INPUT_CPPFLAGS} " \
98- --test-suite btest \
99- ) \
101+ btest_session=$( launchable_record_session test btest) \
100102 && btests+=--launchable-test-reports=" ${btest_report_path} " || :
101103 if [ " $INPUT_CHECK " = " true" ]; then
102- test_all_session=$( launchable record session \
103- --build " ${build_name} " \
104- --flavor test_task=test-all \
105- --flavor workflow=Compilations \
106- --flavor with-gcc=" ${INPUT_WITH_GCC} " \
107- --flavor CFLAGS=" ${INPUT_CFLAGS} " \
108- --flavor CXXFLAGS=" ${INPUT_CXXFLAGS} " \
109- --flavor optflags=" ${INPUT_OPTFLAGS} " \
110- --flavor cppflags=" ${INPUT_CPPFLAGS} " \
111- --test-suite test-all \
112- ) \
104+ test_all_session=$( launchable_record_session test-all) \
113105 && tests+=--launchable-test-reports=" ${test_report_path} " || :
114106 mkdir " ${builddir} " /" ${test_spec_report_path} "
115- test_spec_session=$( launchable record session \
116- --build " ${build_name} " \
117- --flavor test_task=test-spec \
118- --flavor workflow=Compilations \
119- --flavor with-gcc=" ${INPUT_WITH_GCC} " \
120- --flavor CFLAGS=" ${INPUT_CFLAGS} " \
121- --flavor CXXFLAGS=" ${INPUT_CXXFLAGS} " \
122- --flavor optflags=" ${INPUT_OPTFLAGS} " \
123- --flavor cppflags=" ${INPUT_CPPFLAGS} " \
124- --test-suite test-spec \
125- ) \
107+ test_spec_session=$( launchable_record_session test-spec) \
126108 && spec_opts+=--launchable-test-reports=" ${test_spec_report_path} " || :
127109 fi
128110}
0 commit comments