diff options
author | Jakub Jelen <jjelen@redhat.com> | 2020-12-01 18:12:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 09:12:30 -0800 |
commit | f533434871c91baa9e3fcdde882dc9750a6d4b46 (patch) | |
tree | 27f6fea7f2a103a5e83b8b516c141cbb763f9613 /infra | |
parent | 3ef6ac2f1712e5f206520798606cb9ea677e056f (diff) | |
download | oss-fuzz-f533434871c91baa9e3fcdde882dc9750a6d4b46.tar.gz |
[helper] Make sure directories are created before they are passed to container engine (podman) (#4763)
Diffstat (limited to 'infra')
-rwxr-xr-x | infra/helper.py | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/infra/helper.py b/infra/helper.py index dc7366b43..6c02032c7 100755 --- a/infra/helper.py +++ b/infra/helper.py @@ -277,18 +277,27 @@ def get_dockerfile_path(project_name): def _get_corpus_dir(project_name=''): - """Returns path to /corpus directory for the given project (if specified).""" - return os.path.join(BUILD_DIR, 'corpus', project_name) + """Creates and returns path to /corpus directory for the given project (if specified).""" + directory = os.path.join(BUILD_DIR, 'corpus', project_name) + os.makedirs(directory, exist_ok=True) + + return directory def _get_output_dir(project_name=''): - """Returns path to /out directory for the given project (if specified).""" - return os.path.join(BUILD_DIR, 'out', project_name) + """Creates and returns path to /out directory for the given project (if specified).""" + directory = os.path.join(BUILD_DIR, 'out', project_name) + os.makedirs(directory, exist_ok=True) + + return directory def _get_work_dir(project_name=''): - """Returns path to /work directory for the given project (if specified).""" - return os.path.join(BUILD_DIR, 'work', project_name) + """Creates and returns path to /work directory for the given project (if specified).""" + directory = os.path.join(BUILD_DIR, 'work', project_name) + os.makedirs(directory, exist_ok=True) + + return directory def _get_project_language(project_name): |