From c8772e0f9bc6bcab737d0b406f17aacfe503e169 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Mon, 27 Jun 2022 18:34:50 +0200 Subject: [PATCH] Actually activated the cache --- discordHelperWin.py | 2 +- modules/test_adler.py | 3 ++- modules/test_sha.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/discordHelperWin.py b/discordHelperWin.py index 4ef817c..63735a6 100644 --- a/discordHelperWin.py +++ b/discordHelperWin.py @@ -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)) diff --git a/modules/test_adler.py b/modules/test_adler.py index 14d17f9..62aab93 100644 --- a/modules/test_adler.py +++ b/modules/test_adler.py @@ -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) diff --git a/modules/test_sha.py b/modules/test_sha.py index deb5847..4eaf1e2 100644 --- a/modules/test_sha.py +++ b/modules/test_sha.py @@ -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)