summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-reduce/TestRunner.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-06 19:40:37 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-06 19:40:37 +0000
commite2f17e264997ab6f2630d368bfc7b517e75507d3 (patch)
treee2100c3e8f97e911e20e9718e9cc9e6e0bf80152 /llvm/tools/llvm-reduce/TestRunner.cpp
parente5e10b526f2fca057478685777c456e0d2cb7782 (diff)
downloadbcm5719-llvm-e2f17e264997ab6f2630d368bfc7b517e75507d3.tar.gz
bcm5719-llvm-e2f17e264997ab6f2630d368bfc7b517e75507d3.zip
Revert "Added Delta IR Reduction Tool"
This reverts commit r368071, it broke buildbots. llvm-svn: 368073
Diffstat (limited to 'llvm/tools/llvm-reduce/TestRunner.cpp')
-rw-r--r--llvm/tools/llvm-reduce/TestRunner.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/llvm/tools/llvm-reduce/TestRunner.cpp b/llvm/tools/llvm-reduce/TestRunner.cpp
deleted file mode 100644
index 479b9497bf6..00000000000
--- a/llvm/tools/llvm-reduce/TestRunner.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "TestRunner.h"
-
-using namespace llvm;
-
-TestRunner::TestRunner(StringRef TestName, std::vector<std::string> TestArgs,
- StringRef ReducedFilepath, SmallString<128> TmpDirectory)
- : TestName(TestName), TestArgs(TestArgs), ReducedFilepath(ReducedFilepath),
- TmpDirectory(TmpDirectory) {}
-
-/// Runs the interestingness test, passes file to be tested as first argument
-/// and other specified test arguments after that.
-int TestRunner::run(StringRef Filename) {
- std::vector<StringRef> ProgramArgs;
- ProgramArgs.push_back(TestName);
- ProgramArgs.push_back(Filename);
-
- for (unsigned I = 0, E = TestArgs.size(); I != E; ++I)
- ProgramArgs.push_back(TestArgs[I].c_str());
-
- StringRef SR = "";
- Optional<StringRef> Redirects[3] = {SR, SR, SR}; // STDIN, STDOUT, STDERR
- int Result = sys::ExecuteAndWait(TestName, ProgramArgs, None, Redirects);
-
- if (Result < 0) {
- Error E = make_error<StringError>("Error running interesting-ness test\n",
- inconvertibleErrorCode());
- outs() << toString(std::move(E));
- exit(1);
- }
-
- return !Result;
-}
OpenPOWER on IntegriCloud