Actually activated the cache

This commit is contained in:
Maximilien Rigaut 2022-06-27 18:34:50 +02:00
parent ee77507bc9
commit c8772e0f9b
No known key found for this signature in database
GPG Key ID: 4F14B23709ADA5B1
3 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,7 @@ if __name__ == "__main__":
# Will always try to load discordHelper/discordHelper.json
run_db = os.path.join(directory_path, "test_results_found.json")
argv = rf"--all --autodetect --printrate 2 --launch --continue --timeout 2 {db_path}--gen-data {run_db} --db discordHelper/test_results.json".split(" ") # noqa E501
argv = rf"--all --autodetect --printrate 2 --launch --continue --timeout 25 {db_path}--gen-data {run_db} --db discordHelper/test_results.json".split(" ") # noqa E501
# print(" > Starting the discordHelper with the following arguments:")
# print(" > " + " ".join(argv))

View File

@ -16,6 +16,7 @@ def apply_adler(path: str, cached_data: bytes = None) -> hex:
if cached_data is None:
with open(path, "rb") as f:
return hex(adler32(f.read()))
return hex(adler32(cached_data))
@ -24,4 +25,4 @@ class Adler32(test_template.TestWalkTemplateSimpleFunction):
"""
Simple test runner, compare adler32 to known good values.
"""
super().__init__(thread_parameters, apply_adler, "")
super().__init__(thread_parameters, apply_adler, "", use_cache=True)

View File

@ -31,4 +31,4 @@ class Sha256(test_template.TestWalkTemplateSimpleFunction):
"""
Sha256 hash function.
"""
super().__init__(thread_parameters, sha256_hash, "")
super().__init__(thread_parameters, sha256_hash, "", use_cache=True)