From b381a3fae09e23647952c2264f9397da3e7c88db Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Wed, 4 Feb 2015 18:48:03 -0500 Subject: [PATCH] Adding __init__ method to all builder configurations --- master.cfg | 100 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 62 insertions(+), 38 deletions(-) diff --git a/master.cfg b/master.cfg index f2d8e60..f904323 100644 --- a/master.cfg +++ b/master.cfg @@ -444,26 +444,27 @@ The parameters of the class are: CompileClass = CompileGDB TestClass = TestGDB - extra_conf_flags = None - - extra_make_flags = None - extra_make_check_flags = None - test_env = None - - # Set this to false to disable parallel testing (i.e., do not use - # FORCE_PARALLEL) - test_parallel = True - - # 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 - # (i.e., do not use '--with-separate-debug-dir') - use_system_debuginfo = True - def __init__ (self, architecture_triplet = []): factory.BuildFactory.__init__ (self) + + self.extra_conf_flags = None + + self.extra_make_flags = None + self.extra_make_check_flags = None + self.test_env = None + + # Set this to false to disable parallel testing (i.e., do not use + # FORCE_PARALLEL) + self.test_parallel = True + + # Set this to the make command that you want to run in the "make" + # steps. + self.make_command = 'make' + + # Set this to False to disable using system's debuginfo files + # (i.e., do not use '--with-separate-debug-dir') + self.use_system_debuginfo = True + self.addStep (RemoveDirectory (dir = WithProperties (r"%s/build", r'builddir'), description = r"removing old build dir", @@ -528,61 +529,84 @@ The parameters of the class are: class RunTestGDBPlain_c64t64 (BuildAndTestGDBFactory): """Compiling for 64-bit, testing on 64-bit.""" - pass + def __init__ (self, **kwargs): + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBPlain_c32t32 (BuildAndTestGDBFactory): """Compiling on 32-bit, testing on 32-bit.""" - extra_conf_flags = [ r'CFLAGS=-m32' ] - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board unix/-m32' ] + def __init__ (self, **kwargs): + self.extra_conf_flags = [ r'CFLAGS=-m32' ] + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board unix/-m32' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBm32_c64t32 (BuildAndTestGDBFactory): """Compiling on 64-bit, testing on 32-bit.""" - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board unix/-m32' ] + def __init__ (self, **kwargs): + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board unix/-m32' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBNativeGDBServer_c64t64 (BuildAndTestGDBFactory): """Compiling on 64-bit, testing native-gdbserver on 64-bit.""" - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-gdbserver' ] + def __init__ (self, **kwargs): + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-gdbserver' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBNativeGDBServer_c64t32 (BuildAndTestGDBFactory): """Compiling on 64-bit, testing native-gdbserver on 32-bit.""" - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-gdbserver/-m32' ] + def __init__ (self, **kwargs): + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-gdbserver/-m32' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBNativeGDBServer_c32t32 (BuildAndTestGDBFactory): """Compiling on 32-bit, testing native-gdbserver on 32-bit.""" - extra_conf_flags = [ 'CFLAGS=-m32'] - extra_make_check_flags = [ 'RUNTESTFLAGS=--target_board native-gdbserver/-m32'] + def __init__ (self, **kwargs): + self.extra_conf_flags = [ 'CFLAGS=-m32'] + self.extra_make_check_flags = [ 'RUNTESTFLAGS=--target_board native-gdbserver/-m32'] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBNativeExtendedGDBServer_c64t64 (BuildAndTestGDBFactory): """Compiling on 64-bit, testing native-extended-gdbserver on 64-bit.""" - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-extended-gdbserver' ] + def __init__ (self, **kwargs): + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-extended-gdbserver' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBNativeExtendedGDBServer_c64t32 (BuildAndTestGDBFactory): """Compiling on 64-bit, testing native-extended-gdbserver on 32-bit.""" - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-extended-gdbserver/-m32' ] + def __init__ (self, **kwargs): + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-extended-gdbserver/-m32' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBNativeExtendedGDBServer_c32t32 (BuildAndTestGDBFactory): """Compiling on 64-bit, testing native-extended-gdbserver on 32-bit.""" - extra_conf_flags = [ 'CFLAGS=-m32'] - extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-extended-gdbserver/-m32' ] + def __init__ (self, **kwargs): + self.extra_conf_flags = [ 'CFLAGS=-m32'] + self.extra_make_check_flags = [ r'RUNTESTFLAGS=--target_board native-extended-gdbserver/-m32' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBIndexBuild (BuildAndTestGDBFactory): """Testing with the "cc-with-tweaks.sh" passing -i.""" - 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') ] + def __init__ (self, **kwargs): + self.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') ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBIndexBuild_c32t32 (BuildAndTestGDBFactory): """Testing with the "cc-with-tweaks.sh" passing -i. 32-bit version""" - extra_conf_flags = [ 'CFLAGS=-m32' ] - 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'), - 'RUNTESTFLAGS=--target_board unix/-m32'] + def __init__ (self, **kwargs): + self.extra_conf_flags = [ 'CFLAGS=-m32' ] + self.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'), + 'RUNTESTFLAGS=--target_board unix/-m32' ] + BuildAndTestGDBFactory.__init__ (self, **kwargs) # Classes needed for BSD systems class RunTestGDBBSD_Common (BuildAndTestGDBFactory): """Common BSD test configurations""" - extra_conf_flags = [ 'CFLAGS=-I/usr/local/include', '--disable-werror' ] - make_command = 'gmake' + def __init__ (self, **kwargs): + self.extra_conf_flags = [ 'CFLAGS=-I/usr/local/include', '--disable-werror' ] + self.make_command = 'gmake' + BuildAndTestGDBFactory.__init__ (self, **kwargs) class RunTestGDBPlainBSD_c64t64 (RunTestGDBPlain_c64t64, RunTestGDBBSD_Common): """Compiling for 64-bit, testing on 64-bit."""