mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-04 06:10:16 +03:00
gitlab-ci: handle the basic tests in script
Note that those tests were so far ignored only when requesting a single defconfig build, or a single runtime test build; everything else was trigerring thoses tests. However, it feels more natural that they are also ignored when all defconfigs build. or all runtime tests, are explictly requested. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Romain Naour <romain.naour@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Arnout Vandecappelle <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
@@ -7,6 +7,7 @@ main() {
|
||||
|
||||
preamble "${template}"
|
||||
|
||||
gen_basics
|
||||
gen_defconfigs
|
||||
gen_tests
|
||||
}
|
||||
@@ -23,6 +24,22 @@ preamble() {
|
||||
_EOF_
|
||||
}
|
||||
|
||||
gen_basics() {
|
||||
local tst
|
||||
|
||||
# Skip basic tests when explicitly building defconfigs or runtime tests
|
||||
case "${CI_COMMIT_REF_NAME}" in
|
||||
(*-defconfigs) return;;
|
||||
(*-*_defconfig) return;;
|
||||
(*-runtime-tests) return;;
|
||||
(*-tests.*) return;;
|
||||
esac
|
||||
|
||||
for tst in DEVELOPERS flake8 package; do
|
||||
printf 'check-%s: { extends: .check-%s_base }\n' "${tst}" "${tst}"
|
||||
done
|
||||
}
|
||||
|
||||
gen_defconfigs() {
|
||||
local -a defconfigs
|
||||
local build_defconfigs cfg
|
||||
@@ -51,7 +68,7 @@ gen_defconfigs() {
|
||||
|
||||
for cfg in "${defconfigs[@]}"; do
|
||||
if ${build_defconfigs}; then
|
||||
printf '%s: { extends: .defconfig }\n' "${cfg}"
|
||||
printf '%s: { extends: .defconfig_base }\n' "${cfg}"
|
||||
else
|
||||
printf '%s_check: { extends: .defconfig_check }\n' "${cfg}"
|
||||
fi
|
||||
@@ -88,7 +105,7 @@ gen_tests() {
|
||||
esac
|
||||
|
||||
if ${run_tests}; then
|
||||
printf '%s: { extends: .runtime_test }\n' "${tests[@]}"
|
||||
printf '%s: { extends: .runtime_test_base }\n' "${tests[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user