forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Several of the Lit tests Hermes has effectively validate the compiler IR and/or bytecode exactly. Updating these tests requires manually comparing the compiler's output for change validation, then updating the lit tests themselves with parts of the new expected output. This diff adds tooling for auto-generating the expectations for those tests. This accomplished by using a new script that processes the test files themselves, stripping the old expectations, and then adding the new ones (directly from the compiler output). In order to facilitate updating the tests, a new lit substitution, ```%FileCheckOrRegen``` is introduced to hermes' lit tests. When these tests break, the new substitution should be updated to use the newly added ```utils/lit-expect-gen/generate.py``` script, and then the lit tests should be rerun (which causes them to be updated), and the updated tests should be manually inspected for the changes they introduce. The fact that the expectations for these tests can be auto-generated does not mean the tests should be updated without proper code review. In fact, these tests exist to ensure a particular "shape" in the codegen, and thus changes need to be understood. Reviewed By: fbmal7 Differential Revision: D38494469 fbshipit-source-id: a1659470bdb352f8d8a500d9d34495a8d3054296
- Loading branch information
1 parent
b786236
commit 0307e25
Showing
163 changed files
with
13,548 additions
and
9,308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.