-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor integration tests to use the test runner lib
Summary: # Problem We have many different integration tests across the codebase. Each of these run pysa and then compare the output json to an expected json file. Most of those re-implement most of the code, leading to code duplication. One reason for this is that these scripts run from different environments: * Some tests (e.g, the fbcode one) run through buck, hence they need proper buck targets * Some tests are run from `make` and require `PYRE_BINARY` to be set * Some tests are run from the open source version using `python -m pyre.client` For some of these, we want to use annotations rather than an "expected file" to specify expected issues (see design doc https://docs.google.com/document/d/1SwOWt_1rO9i7paF8jVtTVJsw1W1p9G5ROEP7b-B63Xw/edit ). This is hard to do because of all the different scripts around the codebase. # Solution Let's move most of the logic in `runner_lib`, making it generic enough to support all tests. Python scripts now forward the call to `tools/pysa_integration_tests/run.py`, which is a generic integration test runner script. This is less than ideal, but there are no good alternatives - we cannot just import it as a python module since parent directories don't have a `__init__.py`. Buck scripts can just rely on the buck target `//tools/pyre/tools/pysa_integration_tests:runner_lib`. Reviewed By: alexkassil Differential Revision: D64179565 fbshipit-source-id: 44508520cfae73cac4ea0f51853a2ca434dbd820
- Loading branch information
1 parent
8e3d456
commit 04583c0
Showing
6 changed files
with
374 additions
and
243 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
full_result.actual | ||
result.actual | ||
position_invariant_result.json | ||
position_invariant_result.actual | ||
raw_result.json | ||
full_result.json | ||
.pyre/ | ||
.pyre_configuration |
File renamed without changes.
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.