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

core: copy files in light #2024

Merged
merged 1 commit into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/fuzz_introspector/frontends/oss_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ def analyse_folder(language: str = '',
if os.environ.get('OUT', ''):
textcovs_path = os.path.join(os.environ.get('OUT', '/out/'),
'textcov_reports')
for report_name in os.listdir(textcovs_path):
textcov_reports.append(report_name)
if os.path.isdir(textcovs_path):
for report_name in os.listdir(textcovs_path):
textcov_reports.append(report_name)

# Process calltree and method data
for harness in project.get_source_codes_with_harnesses():
Expand Down
9 changes: 9 additions & 0 deletions src/fuzz_introspector/html_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import typing
import random
import string
import shutil

from typing import (
Any,
Expand Down Expand Up @@ -888,6 +889,14 @@ def create_html_report(introspection_proj: analysis.IntrospectionProject,

introspection_proj.dump_debug_report(out_dir)

# Double check source files have been copied
for elem in all_source_files:
dst = os.path.join(out_dir,
constants.SAVED_SOURCE_FOLDER + '/' + elem)
if not os.path.isfile(dst):
os.makedirs(os.path.dirname(dst), exist_ok=True)
shutil.copy(elem, dst)

# Determine the source files required for the java project
source_file_list = []
if introspection_proj.language == 'jvm':
Expand Down
Loading