Adding special classes for FreeBSD builds, because they need to use

gmake instead of make
This commit is contained in:
Sergio Durigan Junior 2015-01-22 19:58:07 -05:00
parent 597359e9bb
commit fe79e798b1
2 changed files with 43 additions and 13 deletions

View file

@ -96,25 +96,25 @@
{ "name" : "FreeBSD-x86_64-m64", "type" : "Plain_c64t64", { "name" : "FreeBSD-x86_64-m64", "type" : "PlainBSD_c64t64",
"builddir" : "freebsd-x86-64", "builddir" : "freebsd-x86-64",
"slavenames" : [ "koobs-freebsd8", "koobs-freebsd9", "slavenames" : [ "koobs-freebsd8", "koobs-freebsd9",
"koobs-freebsd10", "koobs-freebsd11" ] }, "koobs-freebsd10", "koobs-freebsd11" ] },
{ "name" : "FreeBSD-x86_64-native-gdbserver-m64", { "name" : "FreeBSD-x86_64-native-gdbserver-m64",
"type" : "NativeGDBServer_c64t64", "type" : "NativeGDBServerBSD_c64t64",
"builddir" : "freebsd-x86-64-native-gdbserver", "builddir" : "freebsd-x86-64-native-gdbserver",
"slavenames" : [ "koobs-freebsd8", "koobs-freebsd9", "slavenames" : [ "koobs-freebsd8", "koobs-freebsd9",
"koobs-freebsd10", "koobs-freebsd11" ] }, "koobs-freebsd10", "koobs-freebsd11" ] },
{ "name" : "FreeBSD-x86_64-native-extended-gdbserver-m64", { "name" : "FreeBSD-x86_64-native-extended-gdbserver-m64",
"type" : "NativeExtendedGDBServer_c64t64", "type" : "NativeExtendedGDBServerBSD_c64t64",
"builddir" : "freebsd-x86-64-native-extended-gdbserver", "builddir" : "freebsd-x86-64-native-extended-gdbserver",
"slavenames" : [ "koobs-freebsd8", "koobs-freebsd9", "slavenames" : [ "koobs-freebsd8", "koobs-freebsd9",
"koobs-freebsd10", "koobs-freebsd11" ] }, "koobs-freebsd10", "koobs-freebsd11" ] },
{ "name" : "FreeBSD-x86_64-cc-with-index", { "name" : "FreeBSD-x86_64-cc-with-index",
"type" : "IndexBuild", "type" : "IndexBuildBSD",
"builddir" : "freebsd-x86-64-cc-with-index", "builddir" : "freebsd-x86-64-cc-with-index",
"slavenames" : [ "koobs-freebsd8", "koobs-freebsd9", "slavenames" : [ "koobs-freebsd8", "koobs-freebsd9",
"koobs-freebsd10", "koobs-freebsd11" ] } "koobs-freebsd10", "koobs-freebsd11" ] }

View file

@ -329,10 +329,11 @@ buildslave."""
name = "compile gdb" name = "compile gdb"
description = r"compile GDB" description = r"compile GDB"
descriptionDone = r"compiled GDB" descriptionDone = r"compiled GDB"
def __init__ (self, extra_make_flags = [], **kwargs): def __init__ (self, make_command = 'make', extra_make_flags = [],
**kwargs):
Compile.__init__ (self, **kwargs) Compile.__init__ (self, **kwargs)
self.workdir = WithProperties (r"%s", r'builddir') self.workdir = WithProperties (r"%s", r'builddir')
self.command = ['make', self.command = ['%s' % make_command,
WithProperties (r"-j%s", r'jobs'), WithProperties (r"-j%s", r'jobs'),
'all'] + extra_make_flags 'all'] + extra_make_flags
@ -341,9 +342,10 @@ class MakeTAGSGDB (ShellCommand):
description = 'running make TAGS' description = 'running make TAGS'
descriptionDone = 'ran make TAGS' descriptionDone = 'ran make TAGS'
def __init__ (self, **kwargs): def __init__ (self, **kwargs):
ShellCommand.__init__ (self, **kwargs) ShellCommand.__init__ (self, make_command = 'make',
**kwargs)
self.workdir = WithProperties ("%s/build/gdb", 'builddir') self.workdir = WithProperties ("%s/build/gdb", 'builddir')
self.command = [ 'make', 'TAGS' ] self.command = [ '%s' % make_command, 'TAGS' ]
# We do not want to stop testing when this command fails. # We do not want to stop testing when this command fails.
self.haltOnFailure = False self.haltOnFailure = False
self.flunkOnFailure = False self.flunkOnFailure = False
@ -358,15 +360,15 @@ BuildBot halt on failure."""
name = "test gdb" name = "test gdb"
description = r"testing GDB" description = r"testing GDB"
descriptionDone = r"tested GDB" descriptionDone = r"tested GDB"
def __init__ (self, extra_make_check_flags = [], test_env = {}, def __init__ (self, make_command = 'make', extra_make_check_flags = [],
**kwargs): test_env = {}, **kwargs):
ShellCommand.__init__ (self, decodeRC = { 0 : SUCCESS, ShellCommand.__init__ (self, decodeRC = { 0 : SUCCESS,
1 : SUCCESS, 1 : SUCCESS,
2 : SUCCESS }, 2 : SUCCESS },
**kwargs) **kwargs)
self.workdir = WithProperties (r"%s/build/gdb/testsuite", r'builddir') self.workdir = WithProperties (r"%s/build/gdb/testsuite", r'builddir')
self.command = ['make', self.command = ['%s' % make_command,
'-k', '-k',
'check'] + extra_make_check_flags 'check'] + extra_make_check_flags
@ -424,15 +426,21 @@ The parameters of the class are:
Default is False. Beware that parallelizing tests may cause Default is False. Beware that parallelizing tests may cause
some failures due to limited system resources. some failures due to limited system resources.
- make_command: set the command that will be called when running
'make'. This is needed because BSD systems need to run 'gmake'
instead of make. Default is 'make'.
- use_system_debuginfo: set to False if GDB should be compiled - use_system_debuginfo: set to False if GDB should be compiled
with the "--with-separate-debug-dir" option set to with the "--with-separate-debug-dir" option set to
"/usr/lib/debug". Default is True. "/usr/lib/debug". Default is True.
""" """
ConfigureClass = ConfigureGDB ConfigureClass = ConfigureGDB
CompileClass = CompileGDB CompileClass = CompileGDB
TestClass = TestGDB TestClass = TestGDB
extra_conf_flags = None extra_conf_flags = None
extra_make_flags = None extra_make_flags = None
extra_make_check_flags = None extra_make_check_flags = None
test_env = None test_env = None
@ -441,6 +449,10 @@ The parameters of the class are:
# FORCE_PARALLEL) # FORCE_PARALLEL)
test_parallel = False test_parallel = False
# Set this to the make command that you want to run in the "make"
# steps.
make_command = 'make'
# Set this to False to disable using system's debuginfo files # Set this to False to disable using system's debuginfo files
# (i.e., do not use '--with-separate-debug-dir') # (i.e., do not use '--with-separate-debug-dir')
use_system_debuginfo = True use_system_debuginfo = True
@ -467,7 +479,7 @@ The parameters of the class are:
if not self.extra_make_flags: if not self.extra_make_flags:
self.extra_make_flags = [] self.extra_make_flags = []
self.addStep (self.CompileClass (self.extra_make_flags)) self.addStep (self.CompileClass (self.make_command, self.extra_make_flags))
# Disabling this until we figure out how to properly run + test # Disabling this until we figure out how to properly run + test
# self.addStep (MakeTAGSGDB ()) # self.addStep (MakeTAGSGDB ())
@ -481,7 +493,8 @@ The parameters of the class are:
self.extra_make_check_flags.append (WithProperties (r"-j%s", r'jobs')) self.extra_make_check_flags.append (WithProperties (r"-j%s", r'jobs'))
self.extra_make_check_flags.append (r'FORCE_PARALLEL=1') self.extra_make_check_flags.append (r'FORCE_PARALLEL=1')
self.addStep (self.TestClass (self.extra_make_check_flags, self.test_env)) self.addStep (self.TestClass (self.make_command, self.extra_make_check_flags,
self.test_env))
self.addStep (GdbCatSumfileCommand (workdir = WithProperties (r'%s/build/gdb/testsuite', self.addStep (GdbCatSumfileCommand (workdir = WithProperties (r'%s/build/gdb/testsuite',
r'builddir'), r'builddir'),
@ -548,6 +561,23 @@ class RunTestGDBIndexBuild (BuildAndTestGDBFactory):
extra_make_check_flags = [ WithProperties (r'CC_FOR_TARGET=/bin/sh %s/binutils-gdb/gdb/contrib/cc-with-tweaks.sh -i gcc', r'builddir'), extra_make_check_flags = [ WithProperties (r'CC_FOR_TARGET=/bin/sh %s/binutils-gdb/gdb/contrib/cc-with-tweaks.sh -i gcc', r'builddir'),
WithProperties (r'CXX_FOR_TARGET=/bin/sh %s/binutils-gdb/gdb/contrib/cc-with-tweaks.sh -i g++', r'builddir') ] WithProperties (r'CXX_FOR_TARGET=/bin/sh %s/binutils-gdb/gdb/contrib/cc-with-tweaks.sh -i g++', r'builddir') ]
# Classes needed for BSD systems
class RunTestGDBPlainBSD_c64t64 (RunTestGDBPlain_c64t64):
"""Compiling for 64-bit, testing on 64-bit."""
make_command = 'gmake'
class RunTestGDBNativeGDBServerBSD_c64t64 (RunTestGDBNativeGDBServer_c64t64):
"""Compiling on 64-bit, testing native-gdbserver on 64-bit."""
make_command = 'gmake'
class RunTestGDBNativeExtendedGDBServerBSD_c64t64 (RunTestGDBNativeExtendedGDBServer_c64t64):
"""Compiling on 64-bit, testing native-extended-gdbserver on 64-bit."""
make_command = 'gmake'
class RunTestGDBIndexBuildBSD (RunTestGDBIndexBuild):
"""Testing with the "cc-with-tweaks.sh" passing -i. FIXME: include bitness here."""
make_command = 'gmake'
# For now, we only support testing the "master" branch. # For now, we only support testing the "master" branch.
master_filter = ChangeFilter (branch = [ r'master' ]) master_filter = ChangeFilter (branch = [ r'master' ])