Commit 7e8eace3 authored by Ben Avison's avatar Ben Avison
Browse files

Check debug targets of submodules

This adds another job to the `softload` stage, which ensures that the `debug`
target builds successfully.

Since some makefiles don't define such a target, we filter based on the
results of `make -n debug` first, to ensure that the only failures reported
are those generated by tools invoked by `make`.
parent 4ddfcd07
Pipeline #6058 passed with stage
in 4 seconds
......@@ -23,12 +23,18 @@ function check_suppress(job) {
}
# Subroutine to write softload rules for a submodule project.
function write_softload_rules(toolchain) {
print "softload" toolchain ":" >> out
function write_softload_rules(variant) {
if (variant == "debug")
print "debug:" >> out
else
print "softload" variant ":" >> out
print " stage: softload" >> out
print " tags: [ cross ]" >> out
check_suppress("softload" toolchain)
if (toolchain == "_gnu") {
if (variant == "debug")
check_suppress("debug")
else
check_suppress("softload" variant)
if (variant == "_gnu") {
print " variables:" >> out
print " TOOLCHAIN: GNU" >> out
}
......@@ -45,11 +51,16 @@ function write_softload_rules(toolchain) {
print " - COMPONENT=" component " TARGET=" components[component]["target"] " INSTDIR=$INSTALLDIR make -k" rel " clean" >> out
print " - COMPONENT=" component " TARGET=" components[component]["target"] " INSTDIR=$INSTALLDIR make -k" rel " export_hdrs || true" >> out
print " - COMPONENT=" component " TARGET=" components[component]["target"] " INSTDIR=$INSTALLDIR make -k" rel " export_libs || true" >> out
print " - COMPONENT=" component " TARGET=" components[component]["target"] " INSTDIR=$INSTALLDIR make -k" rel " install" >> out
if (variant == "debug")
print " - COMPONENT=" component " TARGET=" components[component]["target"] " INSTDIR=$INSTALLDIR RET=0; make -n " rel " debug &> /dev/null || RET=$?; if [ $RET = 0 ]; then make -k " rel " debug; fi" >> out
else
print " - COMPONENT=" component " TARGET=" components[component]["target"] " INSTDIR=$INSTALLDIR make -k" rel " install" >> out
}
if (variant != "debug") {
print " artifacts:" >> out
print " paths:" >> out
print " - RiscOS/Install/*" >> out
}
print " artifacts:" >> out
print " paths:" >> out
print " - RiscOS/Install/*" >> out
print " # For now, we expect some failed components" >> out
print " allow_failure: true" >> out
print "" >> out
......@@ -638,6 +649,7 @@ BEGIN {
if (projects[project]["softloadable"] == "yes") {
write_softload_rules("")
write_softload_rules("_gnu")
write_softload_rules("debug")
}
# Write rules for disc and ROM builds.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment