Skip to content

Commit

Permalink
[fuzz] Apply fuzz env (suppressions, etc.) when fetching harness list
Browse files Browse the repository at this point in the history
  • Loading branch information
dergoegge committed Mar 7, 2024
1 parent 59567d7 commit 738a537
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/fuzz/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ def main():
sys.exit(1)

# Build list of tests
test_list_all = parse_test_list(fuzz_bin=os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', 'fuzz'))
test_list_all = parse_test_list(
fuzz_bin=os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', 'fuzz'),
source_dir=config['environment']['SRCDIR'],
)

if not test_list_all:
logging.error("No fuzz targets found")
Expand Down Expand Up @@ -383,11 +386,12 @@ def job(t, args):
print(f"{t}{s}")


def parse_test_list(*, fuzz_bin):
def parse_test_list(*, fuzz_bin, source_dir):
test_list_all = subprocess.run(
fuzz_bin,
env={
'PRINT_ALL_FUZZ_TARGETS_AND_ABORT': ''
'PRINT_ALL_FUZZ_TARGETS_AND_ABORT': '',
**get_fuzz_env(target="", source_dir=source_dir)
},
stdout=subprocess.PIPE,
text=True,
Expand Down

0 comments on commit 738a537

Please sign in to comment.