phase1: abort early if current builder does not apply
authorThibaut VARÈNE <hacks@slashdirt.org>
Mon, 24 Oct 2022 14:41:00 +0000 (16:41 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
Some builders (target/subtarget) may only apply to particular branches,
but are nevertheless defined for all branches. Detect such case early,
stop the build but do not mark it FAILURE.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index 9453958d276d61ae351ec9fd26ea3baecda44a1a..e3a2d3e5e01b9703bf5313c9235bbb73b3dfa862 100644 (file)
@@ -722,15 +722,16 @@ for target in targets:
                env = MakeEnv()
        ))
 
-       # check arch
+       # check arch - exit early if does not exist - NB: some targets do not define CONFIG_TARGET_target_subtarget
        factory.addStep(ShellCommand(
                name = "checkarch",
                description = "Checking architecture",
-               command = ["grep", "-sq", "CONFIG_TARGET_%s=y" %(ts[0]), ".config"],
+               command = 'grep -sq CONFIG_TARGET_%s=y .config && grep -sq CONFIG_TARGET_SUBTARGET=\\"%s\\" .config' %(ts[0], ts[1]),
                logEnviron = False,
                want_stdout = False,
                want_stderr = False,
-               haltOnFailure = True
+               haltOnFailure = True,
+               flunkOnFailure = False, # this is not a build FAILURE
        ))
 
        # find libc suffix