mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Lit: Resurrect --no-execute dropped in r187852.
For now, builders in bb.pgr.jp are using it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187886 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
207600d2cf
commit
8f4aab8c2f
@ -27,7 +27,8 @@ class LitConfig:
|
||||
|
||||
def __init__(self, progname, path, quiet,
|
||||
useValgrind, valgrindLeakCheck, valgrindArgs,
|
||||
debug, isWindows, params, config_prefix = None):
|
||||
noExecute, debug, isWindows,
|
||||
params, config_prefix = None):
|
||||
# The name of the test runner.
|
||||
self.progname = progname
|
||||
# The items to add to the PATH environment variable.
|
||||
@ -36,6 +37,7 @@ class LitConfig:
|
||||
self.useValgrind = bool(useValgrind)
|
||||
self.valgrindLeakCheck = bool(valgrindLeakCheck)
|
||||
self.valgrindUserArgs = list(valgrindArgs)
|
||||
self.noExecute = noExecute
|
||||
self.debug = debug
|
||||
self.isWindows = bool(isWindows)
|
||||
self.params = dict(params)
|
||||
|
@ -100,6 +100,9 @@ class GoogleTest(object):
|
||||
if litConfig.useValgrind:
|
||||
cmd = litConfig.valgrindArgs + cmd
|
||||
|
||||
if litConfig.noExecute:
|
||||
return Test.PASS, ''
|
||||
|
||||
out, err, exitCode = lit.TestRunner.executeCommand(
|
||||
cmd, env=test.config.environment)
|
||||
|
||||
|
@ -467,6 +467,9 @@ def executeShTest(test, litConfig, useExternalSh,
|
||||
|
||||
script, isXFail, tmpBase, execdir = res
|
||||
|
||||
if litConfig.noExecute:
|
||||
return (Test.PASS, '')
|
||||
|
||||
# Create the output directory if it does not already exist.
|
||||
Util.mkdir_p(os.path.dirname(tmpBase))
|
||||
|
||||
|
@ -232,6 +232,7 @@ def load_test_suite(inputs):
|
||||
useValgrind = False,
|
||||
valgrindLeakCheck = False,
|
||||
valgrindArgs = [],
|
||||
noExecute = False,
|
||||
debug = False,
|
||||
isWindows = (platform.system()=='Windows'),
|
||||
params = {})
|
||||
|
@ -212,6 +212,9 @@ def main(builtinParameters = {}):
|
||||
group.add_option("", "--time-tests", dest="timeTests",
|
||||
help="Track elapsed wall time for each test",
|
||||
action="store_true", default=False)
|
||||
group.add_option("", "--no-execute", dest="noExecute",
|
||||
help="Don't execute any tests (assume PASS)",
|
||||
action="store_true", default=False)
|
||||
parser.add_option_group(group)
|
||||
|
||||
group = OptionGroup(parser, "Test Selection")
|
||||
@ -279,6 +282,7 @@ def main(builtinParameters = {}):
|
||||
useValgrind = opts.useValgrind,
|
||||
valgrindLeakCheck = opts.valgrindLeakCheck,
|
||||
valgrindArgs = opts.valgrindArgs,
|
||||
noExecute = opts.noExecute,
|
||||
debug = opts.debug,
|
||||
isWindows = (platform.system()=='Windows'),
|
||||
params = userParams,
|
||||
|
Loading…
Reference in New Issue
Block a user