diff options
| author | Brian Potchik <brian@vector35.com> | 2019-09-21 22:02:39 -0400 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2019-09-21 22:02:39 -0400 |
| commit | 19d42b4d5ce3802e59560791aa1caab19f2219b0 (patch) | |
| tree | d20e424c59c9bf024a6b9e050a1d87b2527ce14f /suite/generator.py | |
| parent | 55cec0cdaf8df2fecb1e65c348aebf948b10e67e (diff) | |
Add unit tests for address rebasing.
Diffstat (limited to 'suite/generator.py')
| -rwxr-xr-x | suite/generator.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/suite/generator.py b/suite/generator.py index 443bb6bd..2fe7e8e0 100755 --- a/suite/generator.py +++ b/suite/generator.py @@ -290,6 +290,15 @@ def generate(test_store, outdir, exclude_binaries): binary_oracle.close() print("{0:.2f}".format(time.time() - binary_start_time)) + # Generate oracle data for rebasing tests + name = oraclefile_rel[len(test_store):].replace(os.path.sep, "_").replace(".", "_")[1:] + if name in ["helloworld", "duff", "partial_register_dataflow", "raw"]: + test_data = testcommon.BinaryViewTestBuilder(oraclefile_rel, imageBase=0xf00000) + binary_oracle = OracleTestFile(oraclefile + "_rebasing") + for method in test_data.methods(): + binary_oracle.add_entry(test_data, method) + binary_oracle.close() + if not os.path.exists(oraclefile + ".zip"): with zipfile.ZipFile(oraclefile + ".zip", "w") as zf: zf.write(oraclefile, os.path.relpath(oraclefile, start=os.path.dirname(__file__))) |
