forked from OSchip/llvm-project
Tests require GNU make, called gmake on FreeBSD
llvm-svn: 184748
This commit is contained in:
parent
b4711b2c24
commit
81ca910af7
|
@ -13,6 +13,7 @@ variable.
|
|||
"""
|
||||
|
||||
import os
|
||||
import platform
|
||||
import lldbtest
|
||||
|
||||
def getArchitecture():
|
||||
|
@ -37,6 +38,13 @@ def getArchFlag():
|
|||
|
||||
return (" ARCHFLAG=" + archflag) if archflag else ""
|
||||
|
||||
def getMake():
|
||||
"""Returns the name for GNU make"""
|
||||
if platform.system() == "FreeBSD":
|
||||
return "gmake "
|
||||
else:
|
||||
return "make "
|
||||
|
||||
def getArchSpec(architecture):
|
||||
"""
|
||||
Helper function to return the key-value string to specify the architecture
|
||||
|
@ -81,13 +89,14 @@ def buildDefault(sender=None, architecture=None, compiler=None, dictionary=None,
|
|||
"""Build the binaries the default way."""
|
||||
if clean:
|
||||
lldbtest.system(["/bin/sh", "-c",
|
||||
"make clean" + getCmdLine(dictionary) + "; make"
|
||||
getMake() + "clean" + getCmdLine(dictionary) + ";"
|
||||
+ getMake()
|
||||
+ getArchSpec(architecture) + getCCSpec(compiler)
|
||||
+ getCmdLine(dictionary)],
|
||||
sender=sender)
|
||||
else:
|
||||
lldbtest.system(["/bin/sh", "-c",
|
||||
"make" + getArchSpec(architecture) + getCCSpec(compiler)
|
||||
getMake() + getArchSpec(architecture) + getCCSpec(compiler)
|
||||
+ getCmdLine(dictionary)],
|
||||
sender=sender)
|
||||
|
||||
|
@ -98,14 +107,14 @@ def buildDwarf(sender=None, architecture=None, compiler=None, dictionary=None, c
|
|||
"""Build the binaries with dwarf debug info."""
|
||||
if clean:
|
||||
lldbtest.system(["/bin/sh", "-c",
|
||||
"make clean" + getCmdLine(dictionary)
|
||||
+ "; make MAKE_DSYM=NO"
|
||||
getMake() + "clean" + getCmdLine(dictionary)
|
||||
+ ";" + getMake() + "MAKE_DSYM=NO"
|
||||
+ getArchSpec(architecture) + getCCSpec(compiler)
|
||||
+ getCmdLine(dictionary)],
|
||||
sender=sender)
|
||||
else:
|
||||
lldbtest.system(["/bin/sh", "-c",
|
||||
"make MAKE_DSYM=NO"
|
||||
getMake() + "MAKE_DSYM=NO"
|
||||
+ getArchSpec(architecture) + getCCSpec(compiler)
|
||||
+ getCmdLine(dictionary)],
|
||||
sender=sender)
|
||||
|
@ -118,7 +127,8 @@ def cleanup(sender=None, dictionary=None):
|
|||
#import traceback
|
||||
#traceback.print_stack()
|
||||
if os.path.isfile("Makefile"):
|
||||
lldbtest.system(["/bin/sh", "-c", "make clean"+getCmdLine(dictionary)],
|
||||
lldbtest.system(["/bin/sh", "-c",
|
||||
getMake() + "clean" + getCmdLine(dictionary)],
|
||||
sender=sender)
|
||||
|
||||
# True signifies that we can handle cleanup.
|
||||
|
|
Loading…
Reference in New Issue