Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fuzz: Apply fuzz env (suppressions, etc.) when fetching harness list #29583

Merged
merged 1 commit into from Mar 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions test/fuzz/test_runner.py
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