diff options
| author | Eric Fiselier <eric@efcs.ca> | 2014-11-25 03:03:32 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2014-11-25 03:03:32 +0000 |
| commit | e620b5eaa60b87f18350e5a7dd3687f23e2e2af8 (patch) | |
| tree | 4505108e6426adc007af930de38c753b36683b1f | |
| parent | bd9ce4ea51e4b368b52a9ce2c70e4b30125e3175 (diff) | |
| download | bcm5719-llvm-e620b5eaa60b87f18350e5a7dd3687f23e2e2af8.tar.gz bcm5719-llvm-e620b5eaa60b87f18350e5a7dd3687f23e2e2af8.zip | |
Use lit.util.executeCommand instead of our own version
llvm-svn: 222717
| -rw-r--r-- | libcxx/test/lit.cfg | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg index dc72b46b7f3..ec05d1c7cff 100644 --- a/libcxx/test/lit.cfg +++ b/libcxx/test/lit.cfg @@ -36,24 +36,6 @@ class LibcxxTestFormat(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: @@ -121,7 +103,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): if use_verify: cmd += ['-Xclang', '-verify'] - out, err, rc = self.execute_command(cmd) + out, err, rc = lit.util.executeCommand(cmd) return cmd, out, err, rc def _clean(self, exec_path): @@ -136,7 +118,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): cmd.append(exec_path) if lit_config.useValgrind: cmd = lit_config.valgrindArgs + cmd - out, err, exitCode = self.execute_command(cmd, in_dir) + out, err, exitCode = lit.util.executeCommand(cmd, cwd=in_dir) return cmd, out, err, exitCode def _evaluate_test(self, test, use_verify, lit_config): |

