Lines Matching full:directory
9 Repository Directory will contain sources of the projects as well as the
11 Repository Directory structure:
22 - Copy over a copy of the Repository Directory. (TODO: Prefer to ensure that
23 the build directory does not pollute the repository to min network
33 The script is being run from the Repository Directory.
153 # The scan-build result directory.
157 # The name of the directory storing the cached project source. If this
158 # directory does not exist, the download script will be executed.
159 # That script should create the "CachedSource" directory and download the
163 # The name of the directory containing the source code that will be analyzed.
164 # Each time a project is analyzed, a fresh copy of its CachedSource directory
165 # will be copied to the PatchedSource directory and then the local patches
197 def run_cleanup_script(directory: str, build_log_file: IO):
201 cwd = os.path.join(directory, PATCHED_SOURCE_DIR_NAME)
202 script_path = os.path.join(directory, CLEANUP_SCRIPT)
339 self.vout(f" Build directory: {project_dir}.\n")
341 # Set the build results directory.
369 def build(self, directory: str, output_dir: str) -> Tuple[float, int]:
373 self.out(f"Output directory: {output_dir}\n")
389 self._download_and_patch(directory, build_log_file)
390 run_cleanup_script(directory, build_log_file)
391 build_time, memory = self.scan_build(directory, output_dir,
394 build_time, memory = self.analyze_preprocessed(directory,
398 run_cleanup_script(directory, build_log_file)
399 normalize_reference_results(directory, output_dir,
408 def scan_build(self, directory: str, output_dir: str,
414 build_script_path = os.path.join(directory, BUILD_SCRIPT)
427 # Run scan-build from within the patched source directory.
428 cwd = os.path.join(directory, PATCHED_SOURCE_DIR_NAME)
496 def analyze_preprocessed(self, directory: str,
501 if os.path.exists(os.path.join(directory, BUILD_SCRIPT)):
517 plist_path = os.path.join(directory, output_dir, "date")
524 for full_file_name in glob.glob(directory + "/*"):
546 command, cwd=directory, stderr=log_file,
572 def _download_and_patch(self, directory: str, build_log_file: IO):
576 cached_source = os.path.join(directory, CACHED_SOURCE_DIR_NAME)
581 self._download(directory, build_log_file)
586 patched_source = os.path.join(directory, PATCHED_SOURCE_DIR_NAME)
594 self._apply_patch(directory, build_log_file)
596 def _download(self, directory: str, build_log_file: IO):
601 self._download_from_git(directory, build_log_file)
603 self._unpack_zip(directory, build_log_file)
605 self._run_download_script(directory, build_log_file)
611 def _download_from_git(self, directory: str, build_log_file: IO):
613 cached_source = os.path.join(directory, CACHED_SOURCE_DIR_NAME)
616 cwd=directory, stderr=build_log_file,
622 def _unpack_zip(self, directory: str, build_log_file: IO):
623 zip_files = list(glob.glob(directory + "/*.zip"))
636 zip_file.extractall(os.path.join(directory,
640 def _run_download_script(directory: str, build_log_file: IO):
641 script_path = os.path.join(directory, DOWNLOAD_SCRIPT)
642 utils.run_script(script_path, build_log_file, directory,
646 def _apply_patch(self, directory: str, build_log_file: IO):
647 patchfile_path = os.path.join(directory, PATCHFILE_NAME)
648 patched_source = os.path.join(directory, PATCHED_SOURCE_DIR_NAME)
717 Given the scan-build output directory, checks if the build failed
719 creates a summary file in the output directory.
772 def run_cmp_results(directory: str, strictness: int = 0) -> bool:
786 ref_dir = os.path.join(directory, REF_PREFIX + OUTPUT_DIR_NAME)
787 new_dir = os.path.join(directory, OUTPUT_DIR_NAME)
789 # We have to go one level down the directory tree.
819 patched_source = os.path.join(directory, PATCHED_SOURCE_DIR_NAME)
848 def normalize_reference_results(directory: str, output_dir: str,
861 path_prefix = directory
864 path_prefix = os.path.join(directory, PATCHED_SOURCE_DIR_NAME)