Skip to content

Commit

Permalink
BUILDBOT: Only build tests when running them
Browse files Browse the repository at this point in the history
  • Loading branch information
lephilousophe committed Oct 19, 2024
1 parent 0263c42 commit 573453c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 27 deletions.
11 changes: 2 additions & 9 deletions buildbot-config/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,17 +403,10 @@ def addBuildSteps(self, f, platform, *, env, **kwargs):
**kwargs))

def addTestsSteps(self, f, platform, *, env, **kwargs):
if not platform.canBuildTests(self):
if not platform.canRunTests(self):
return

if platform.canRunTests(self):
f.addStep(steps.Test(env = env, **kwargs))
else:
# Compile Tests (Runner), but do not execute (as binary is non-native)
f.addStep(steps.Test(command = [
"make",
"test/runner" ],
env = env, **kwargs))
f.addStep(steps.Test(env = env, **kwargs))

def addPackagingSteps(self, f, platform, *, env,
src_path, daily_builds_path, daily_builds_url):
Expand Down
24 changes: 6 additions & 18 deletions buildbot-config/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Platform:
'configureargs', 'buildconfigureargs',
'packageable', 'built_files', 'data_files',
'packaging_cmd', 'strip_cmd', 'archiveext',
'testable', 'run_tests', 'build_devtools',
'run_tests', 'build_devtools',
'workerimage', 'lock_access',
'icon', 'description_']

Expand All @@ -57,8 +57,6 @@ def __init__(self, name):
self.packaging_cmd = None
self.strip_cmd = None
self.archiveext = "tar.xz"
# Can build tests
self.testable = True
# Can run tests
self.run_tests = False

Expand Down Expand Up @@ -106,8 +104,6 @@ def getPackagingCmd(self, build):
return _getFromBuild(self.packaging_cmd, build)
def getStripCmd(self, build):
return _getFromBuild(self.strip_cmd, build)
def canBuildTests(self, build):
return _getFromBuild(self.testable, build)
def canRunTests(self, build):
return _getFromBuild(self.run_tests, build)
def getWorkerImage(self, build):
Expand Down Expand Up @@ -136,7 +132,6 @@ def _3ds():
builds.ScummVMBuild: [ "dist_3ds/*" ],
}
platform.archiveext = "zip"
platform.testable = False

platform.description = "Nintendo 3DS"
platform.icon = "3ds"
Expand Down Expand Up @@ -213,7 +208,6 @@ def android(suffix, scummvm_target, ndk_target, cxx_target, abi_version,
builds.ScummVMBuild: [ "debug" ],
}
platform.archiveext = "zip"
platform.testable = False

platform.description = description
platform.icon = "android"
Expand Down Expand Up @@ -268,7 +262,7 @@ def appletv():

def debian(name_suffix, image_suffix, host,
package=True,
build_tests=True, run_tests=True, build_devtools=False,
run_tests=True, build_devtools=False,
buildconfigureargs=None, env=None, tools=True,
description=None):
platform = Platform("debian-{0}".format(name_suffix))
Expand Down Expand Up @@ -303,7 +297,6 @@ def debian(name_suffix, image_suffix, host,
"scummvm-tools-cli"
]
}
platform.testable = build_tests
platform.run_tests = run_tests
platform.build_devtools = build_devtools
platform.packageable = package
Expand All @@ -316,24 +309,24 @@ def debian(name_suffix, image_suffix, host,
debian("x86-64", "x86_64", "x86_64-linux-gnu", description="Debian (64\xa0bits)",
build_devtools=True)
debian("x86-64-nullbackend", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
build_tests=False, run_tests=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--backend=null", "--enable-opl2lpt", "--enable-text-console" ],
})
debian("x86-64-clang", "x86_64-clang", "x86_64-linux-gnu", package=False, tools=False,
run_tests=False, build_devtools=True)
debian("x86-64-plugins", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
build_tests=False, run_tests=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic" ],
})
debian("x86-64-dynamic-detection", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
build_tests=False, run_tests=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--enable-plugins", "--default-dynamic", "--enable-detection-dynamic" ],
})
debian("x86-64-sdl1.2", "x86_64", "x86_64-linux-gnu", package=False, tools=False,
build_tests=False, run_tests=False,
run_tests=False,
buildconfigureargs = {
builds.ScummVMBuild: [ "--disable-all-engines", "--enable-engine=testbed",],
},
Expand Down Expand Up @@ -565,7 +558,6 @@ def nds():
builds.ScummVMBuild: [ "dsdist/*" ],
}
platform.archiveext = "zip"
platform.testable = False

platform.description = "Nintendo DS"
platform.icon = 'ds'
Expand Down Expand Up @@ -604,7 +596,6 @@ def opendingux_beta(target, toolchain, libc, description=None):
builds.ScummVMBuild: [ "scummvm_{0}.opk".format(target) ],
}
platform.archiveext = "zip"
platform.testable = False

platform.description = "OpenDingux beta - {0}".format(description)
platform.icon = "dingux"
Expand Down Expand Up @@ -734,7 +725,6 @@ def riscos(suffix, prefix_subdir, variable_suffix, host, description = None):
builds.ScummVMToolsBuild: [ "!ScummTool" ],
}
platform.archiveext = "zip"
platform.testable = False

platform.icon = 'riscos'
platform.description = description
Expand All @@ -754,7 +744,6 @@ def switch():
builds.ScummVMBuild: [ "switch_release/*" ],
}
platform.archiveext = "zip"
platform.testable = False

platform.description = "Nintendo Switch"
platform.icon = 'switch'
Expand All @@ -777,7 +766,6 @@ def vita():
builds.ScummVMBuild: [ "scummvm.vpk" ],
}
platform.archiveext = "zip"
platform.testable = False

platform.description = "PlayStation Vita"
platform.icon = 'psp2'
Expand Down

0 comments on commit 573453c

Please sign in to comment.