diff options
| author | Xusheng <xusheng@vector35.com> | 2020-11-16 17:51:46 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2021-02-17 12:05:47 +0800 |
| commit | d9b1df165f9daad6a5229718ecd0ee50a5ef6bf1 (patch) | |
| tree | 6307b8c16c80f8203bdb96ebc3d54a8d9f10b3bf /suite/generator.py | |
| parent | b651141704a555cf0b6c53152ab0f70d011ec8af (diff) | |
add support for type xref and variable xref
Diffstat (limited to 'suite/generator.py')
| -rwxr-xr-x | suite/generator.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/suite/generator.py b/suite/generator.py index 75a83ad6..bae35016 100755 --- a/suite/generator.py +++ b/suite/generator.py @@ -241,6 +241,32 @@ def generate(test_store, outdir, exclude_binaries): unittest = UnitTestFile(os.path.join(outdir, "unit.py"), outdir, test_store) oracle = OracleTestFile(os.path.join(outdir, "oracle")) + # check all files to see if there is any newly added ones. + # If so, create a zip archive for it and delete the original file + allfiles = sorted(testcommon.get_file_list(test_store)) + for progress, testfile in enumerate(allfiles): + oraclefile = None + zip_only = False + if testfile.endswith(".gitignore"): + continue + if testfile.endswith(".pkl"): + continue + elif testfile.endswith(".DS_Store"): + continue + elif testfile.endswith(".zip"): + continue + else: + if os.path.exists(testfile + ".zip"): + # We've got a zip file for it, skip + continue + + # create the zip archive for the file + if not os.path.exists(testfile + ".zip"): + with zipfile.ZipFile(testfile + ".zip", "w") as zf: + zf.write(testfile, os.path.relpath(testfile, start=os.path.dirname(__file__))) + + os.unlink(testfile) + # Generate the tests that don't involve binaries but do involve oracles builder = testcommon.TestBuilder(test_store) tests = builder.methods() |
