|
CIRCT 22.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, bool emitBytecode) | |
| 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. | |
Public Attributes | |
| const bool | emitBytecode |
| If true, use MLIR bytecode on-disk. Otherwise, use MLIR text. | |
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, | ||
| bool | emitBytecode | ||
| ) |
Definition at line 27 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 69 of file Tester.cpp.
| TestCase Tester::get | ( | mlir::ModuleOp | module | ) | const |
Create a new test case for the given module.
Definition at line 64 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().
| const bool circt::Tester::emitBytecode |
If true, use MLIR bytecode on-disk. Otherwise, use MLIR text.
Definition at line 57 of file Tester.h.
Referenced by circt::TestCase::ensureFileOnDisk().
|
private |
|
private |
|
private |