diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-11-25 03:06:31 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-11-25 03:06:31 +0000 |
commit | 17b1568fc411a1402fba74bf4ebf8c3863afb78c (patch) | |
tree | 1f2fe644608d204ca1bb85f082f3c2772cb66e77 /libcxxabi | |
parent | e620b5eaa60b87f18350e5a7dd3687f23e2e2af8 (diff) | |
download | llvm-17b1568fc411a1402fba74bf4ebf8c3863afb78c.zip llvm-17b1568fc411a1402fba74bf4ebf8c3863afb78c.tar.gz llvm-17b1568fc411a1402fba74bf4ebf8c3863afb78c.tar.bz2 |
Use lit.util.executeCommand instead of our own version
llvm-svn: 222718
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/test/lit.cfg | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/libcxxabi/test/lit.cfg b/libcxxabi/test/lit.cfg index 20d5822..9372fd6 100644 --- a/libcxxabi/test/lit.cfg +++ b/libcxxabi/test/lit.cfg @@ -28,24 +28,6 @@ class LibcxxabiTestFormat(lit.formats.FileBasedTest): self.ld_flags = list(ld_flags) self.exec_env = dict(exec_env) - def execute_command(self, command, in_dir=None): - kwargs = { - 'stdin' :subprocess.PIPE, - 'stdout':subprocess.PIPE, - 'stderr':subprocess.PIPE, - } - if in_dir: - kwargs['cwd'] = in_dir - p = subprocess.Popen(command, **kwargs) - out,err = p.communicate() - exitCode = p.wait() - - # Detect Ctrl-C in subprocess. - if exitCode == -signal.SIGINT: - raise KeyboardInterrupt - - return out, err, exitCode - def execute(self, test, lit_config): while True: try: @@ -111,7 +93,7 @@ class LibcxxabiTestFormat(lit.formats.FileBasedTest): compile_cmd = [self.cxx_under_test, '-o', exec_path, source_path] + self.cpp_flags + self.ld_flags cmd = compile_cmd - out, err, exitCode = self.execute_command(cmd) + out, err, exitCode = lit.util.executeCommand(cmd) if exitCode != 0: report = """Command: %s\n""" % ' '.join(["'%s'" % a for a in cmd]) @@ -131,7 +113,7 @@ class LibcxxabiTestFormat(lit.formats.FileBasedTest): cmd.append(exec_path) if lit_config.useValgrind: cmd = lit_config.valgrindArgs + cmd - out, err, exitCode = self.execute_command(cmd, source_dir) + out, err, exitCode = lit.util.executeCommand(cmd, cwd=source_dir) if exitCode != 0: report = """Compiled With: %s\n""" % \ ' '.join(["'%s'" % a for a in compile_cmd]) |