aboutsummaryrefslogtreecommitdiff
path: root/lit.cfg
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-12-15 02:51:57 +0000
committerMatthias Braun <matze@braunis.de>2015-12-15 02:51:57 +0000
commita8164c67acd9e3aae36dfb6d99966d1e426f68af (patch)
tree51b75fa03ddf5b546022ff6ebe987e1496a99139 /lit.cfg
parent28e3f2db7a6fa7a6859ab9a5bd06ff6e23d2d960 (diff)
Revert "(HEAD -> master, origin/master, origin/HEAD) EXPRIMENTAL: Support separate stdout/stderr redirect"
Revert accidental commit. This reverts commit r255609. git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@255610 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lit.cfg')
-rw-r--r--lit.cfg31
1 files changed, 12 insertions, 19 deletions
diff --git a/lit.cfg b/lit.cfg
index a80b758e..6918b1a2 100644
--- a/lit.cfg
+++ b/lit.cfg
@@ -87,33 +87,37 @@ def prepareRunSafely(config, commandline, outfile):
workdir = None
tokens = shlex.split(commandline)
# Parse "< INPUTFILE", "> OUTFILE", "2> OUTFILE" patterns
- i = 0
- while i < len(tokens):
+ for i in range(len(tokens)):
if tokens[i] == "<" and i+1 < len(tokens):
stdin = tokens[i+1]
del tokens[i+1]
del tokens[i]
- continue
+ break
elif tokens[i] == ">" and i+1 < len(tokens):
stdout = tokens[i+1]
del tokens[i+1]
del tokens[i]
- continue
+ break
elif tokens[i] == "2>" and i+1 < len(tokens):
stderr = tokens[i+1]
del tokens[i+1]
del tokens[i]
- continue
+ break
if i+2 < len(tokens) and tokens[i] == "cd" and tokens[i+2] == ";":
workdir = tokens[i+1]
del tokens[i+2]
del tokens[i+1]
del tokens[i]
- continue
- i += 1
+
+ if stdin is None:
+ stdin = "/dev/null"
+ if stdout is not None or stderr is not None:
+ raise Exception("stdout/stderr redirection in combination with RunSafely not implemented yet")
runsafely = "%s/RunSafely.sh" % config.test_suite_root
runsafely_prefix = [ runsafely ]
+ if not config.output_append_exitstatus:
+ runsafely_prefix += [ "--omit-exitval" ]
if workdir is not None:
runsafely_prefix += [ "-d", workdir ]
if config.remote_host:
@@ -126,19 +130,8 @@ def prepareRunSafely(config, commandline, outfile):
runsafely_prefix += [ "-rp", config.remote_port ]
if config.run_under:
runsafely_prefix += [ "-u", config.run_under ]
- if not config.produce_traditional_output:
- runsafely_prefix += [ "-n" ]
- if stdout is not None:
- runsafely_prefix += [ "-o", stdout ]
- if stderr is not None:
- runsafely_prefix += [ "-e", stderr ]
- else:
- if stdout is not None or stderr is not None:
- raise Exception("separate stdout/stderr redirection not possible with traditional output")
timeit = "%s/tools/timeit-target" % config.test_source_root
timeout = "7200"
- if stdin is None:
- stdin = "/dev/null"
runsafely_prefix += [ "-t", timeit, timeout, stdin, outfile ]
new_commandline = " ".join(map(quote, runsafely_prefix + tokens))
@@ -232,6 +225,6 @@ config.name = 'test-suite'
config.test_format = TestSuiteTest()
config.suffixes = ['.test']
config.excludes = ['ABI-Testsuite']
-config.produce_traditional_output = False
+config.output_append_exitstatus = False
if 'SSH_AUTH_SOCK' in os.environ:
config.environment['SSH_AUTH_SOCK'] = os.environ['SSH_AUTH_SOCK']