summaryrefslogtreecommitdiff
path: root/compiler/optimizing/test/ConstantFolding.java
AgeCommit message (Collapse)Author
2015-01-19ART: Invoke Checker from run-test scripts David Brazdil
This patch moves Checker-based tests of the optimizing compiler into the art/test directory and modifies the run-test scripts to dump the CFG during compilation and to verify the graph using Checker as part of the "running" stage. Outputs generated by running the test and running Checker are concatenated and compared with expected.txt. Checker is invoked only if the test's name name matches the format "<number>-checker-*" and it's currently enabled only for optimizing + host configs. The tests are still invoked on other configs but without Checker. Change-Id: Ib24da808cd4bca66f07e0dbeb913a418065f2859
2015-01-08ART: Refactored regex code in Checker David Brazdil
This patch refactors how Checker constructs regular expressions which it uses to parse tests and verify compiler output. It also replaces all occurrences of the '[0-9]+' ID-matching expression with the '\d+' shorthand. Change-Id: I5f854a25707e44ed2fa1673ff084990e8f43e4a2
2014-12-31ART: New types of Checker assertions David Brazdil
Checker now supports positive out-of-order assertions (CHECK-DAG), which are useful for matching dependency graphs, and negative assertions (CHECK-NOT) to test element removal. ConstantFolding tests are rewritten using -DAG checks and Inliner tests are added. Change-Id: I5afb665f532b24683624b6d21ef4377cb441d731
2014-12-17ART: Added Checker, a pattern matching test engine David Brazdil
This patch adds a Python script which implements a domain-specific mini-language similar to that of LLVM's FileCheck. It is primarily intended for writing tests for the optimizing compiler but could be configured for other use cases too. It is implemented from scratch in order to avoid dependency on LLVM. Checker tests are written in Java and dex2oat is invoked with a flag which dumps the CFG before and after each pass of the optimizing compiler. The output is then compared against assertions in the test's comments parsed by Checker. See comments in tools/checker.py for more details about the currently supported language features. This initial CL implements only one type of assertion - whether the output contains lines matching a desired pattern in the given order - but supports both plain text and regex matching and allows for equivalency testing by matching for the outcome of a previous match. See the tests in compiler/optimizing/test/ConstantFolding.java for examples. Change-Id: I1ad7431b399c38dc0391ccee74d2c643ba0b0675