def runBuildCommands(commands, sender): try: lldbtest.system(commands, sender=sender) except subprocess.CalledProcessError as called_process_error: # Convert to a build-specific error. # We don't do that in lldbtest.system() since that # is more general purpose. raise build_exception.BuildError(called_process_error)
def buildDwo(sender=None, architecture=None, compiler=None, dictionary=None, clean=True): """Build the binaries with dwarf debug info.""" commands = [] if clean: commands.append([getMake(), "clean", getCmdLine(dictionary)]) commands.append([getMake(), "MAKE_DSYM=NO", "MAKE_DWO=YES", getArchSpec(architecture), getCCSpec(compiler), getCmdLine(dictionary)]) lldbtest.system(commands, sender=sender) # True signifies that we can handle building dwo. return True
def cleanup(sender=None, dictionary=None): """Perform a platform-specific cleanup after the test.""" #import traceback #traceback.print_stack() commands = [] if os.path.isfile("Makefile"): commands.append([getMake(), "clean", getCmdLine(dictionary)]) lldbtest.system(commands, sender=sender) # True signifies that we can handle cleanup. return True
def buildDefault(sender=None, architecture=None, compiler=None, dictionary=None, clean=True): """Build the binaries the default way.""" commands = [] if clean: commands.append([getMake(), "clean", getCmdLine(dictionary)]) commands.append([getMake(), getArchSpec(architecture), getCCSpec(compiler), getCmdLine(dictionary)]) lldbtest.system(commands, sender=sender) # True signifies that we can handle building default. return True
def buildGModules(sender=None, architecture=None, compiler=None, dictionary=None, testdir=None, testname=None): """Build the binaries with dwarf debug info.""" commands = [] commands.append( getMake(testdir, testname) + [ "MAKE_DSYM=NO", "MAKE_GMODULES=YES", getArchSpec(architecture), getCCSpec(compiler), getCmdLine(dictionary) ]) lldbtest.system(commands, sender=sender) # True signifies that we can handle building with gmodules. return True
def buildGModules( sender=None, architecture=None, compiler=None, dictionary=None, testdir=None, testname=None): """Build the binaries with dwarf debug info.""" commands = [] commands.append(getMake(testdir, testname) + ["MAKE_DSYM=NO", "MAKE_GMODULES=YES", getArchSpec(architecture), getCCSpec(compiler), getCmdLine(dictionary)]) lldbtest.system(commands, sender=sender) # True signifies that we can handle building with gmodules. return True