CIRCT 20.0.0git
|
A testing environment for reduction attempts. More...
#include <Tester.h>
Public Member Functions | |
Tester (llvm::StringRef testScript, llvm::ArrayRef< std::string > testScriptArgs, bool testMustFail) | |
std::pair< bool, size_t > | isInteresting (mlir::ModuleOp module) const |
Runs the interestingness testing script on a MLIR test case file. | |
bool | isInteresting (llvm::StringRef testCase) const |
Return whether the file in the given path is interesting. | |
TestCase | get (mlir::ModuleOp module) const |
Create a new test case for the given module . | |
TestCase | get (llvm::Twine filepath) const |
Create a new test case for the given file already on disk. | |
Private Attributes | |
llvm::StringRef | testScript |
The binary to execute in order to check a reduction attempt for interestingness. | |
llvm::ArrayRef< std::string > | testScriptArgs |
Additional arguments to pass to testScript . | |
bool | testMustFail |
Consider the testcase to be interesting if it fails rather than on exit code 0. | |
A testing environment for reduction attempts.
This class tracks the program used to check reduction attempts for interestingness and additional arguments to pass to that tool. Use get()
to obtain a new test case that can be queried for information on an individual MLIR module.
Tester::Tester | ( | llvm::StringRef | testScript, |
llvm::ArrayRef< std::string > | testScriptArgs, | ||
bool | testMustFail | ||
) |
Definition at line 25 of file Tester.cpp.
TestCase Tester::get | ( | llvm::Twine | filepath | ) | const |
Create a new test case for the given file already on disk.
Definition at line 67 of file Tester.cpp.
TestCase Tester::get | ( | mlir::ModuleOp | module | ) | const |
Create a new test case for the given module
.
Definition at line 62 of file Tester.cpp.
bool circt::Tester::isInteresting | ( | llvm::StringRef | testCase | ) | const |
Return whether the file in the given path is interesting.
std::pair< bool, size_t > circt::Tester::isInteresting | ( | mlir::ModuleOp | module | ) | const |
Runs the interestingness testing script on a MLIR test case file.
Returns true if the interesting behavior is present in the test case or false otherwise.
Referenced by circt::TestCase::isInteresting().
|
private |
|
private |
|
private |