Skip to content

Commit

Permalink
Revert some testsuite.py changes
Browse files Browse the repository at this point in the history
(I really need to spend more time testing these things. I'm just too tired.)
  • Loading branch information
lpereira committed Aug 6, 2024
1 parent 7bc2167 commit 11ff0ea
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/scripts/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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-")):
Expand Down

0 comments on commit 11ff0ea

Please sign in to comment.