From 11ff0ea3948e79ab2808975076f3f33014bc01bd Mon Sep 17 00:00:00 2001 From: "L. Pereira" Date: Mon, 5 Aug 2024 18:25:26 -0700 Subject: [PATCH] Revert some testsuite.py changes (I really need to spend more time testing these things. I'm just too tired.) --- src/scripts/testsuite.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/scripts/testsuite.py b/src/scripts/testsuite.py index 36954769c..44571f752 100755 --- a/src/scripts/testsuite.py +++ b/src/scripts/testsuite.py @@ -24,13 +24,6 @@ BUILD_DIR = arg sys.argv.remove(arg) -HOME_DIR = "." -with open(f"{BUILD_DIR}/CMakeCache.txt", "r") as cache: - for line in cache.readlines(): - if line.startswith("CMAKE_HOME_DIRECTORY:INTERNAL"): - _, HOME_DIR = line.strip().split("=") - break - if os.getenv('REQUESTS_DEBUG'): logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) @@ -69,7 +62,7 @@ def setUp(self, env=None, harness='testrunner'): self.files_to_remove = [] for file_to_copy in self.files_to_copy[harness]: base = os.path.basename(file_to_copy) - shutil.copyfile(f'{HOME_DIR}/{file_to_copy}', base) + shutil.copyfile(file_to_copy, base) self.files_to_remove.append(base) open('htpasswd', 'w').close() @@ -1048,14 +1041,14 @@ def run_test(self, contents): @staticmethod def wrap(name): - with open(os.path.join(HOME_DIR, "fuzz", "regression", name), "rb") as f: + with open(os.path.join("fuzz", "regression", name), "rb") as f: contents = str(f.read(), "latin-1") def run_test_wrapped(self): return self.run_test(contents) return run_test_wrapped def only_request_fuzzer_regression(): - for path in os.listdir(f"{HOME_DIR}/fuzz/regression"): + for path in os.listdir("fuzz/regression"): if not "request_fuzzer" in path: continue if path.startswith(("clusterfuzz-", "crash-")):