Skip to content

Commit 706d352

Browse files
authored
Improve C performance test running (#183)
1 parent 10ada84 commit 706d352

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/exploit_iq_commons/utils/dep_tree.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,9 @@ def install_dependencies(self, manifest_path: Path):
507507
file_data = RPMDependencyManager.get_instance().container_image
508508
with open(os.path.join(download_path, "container_image.txt"), "w") as f:
509509
f.write(file_data)
510+
#filter out kernel files from libbpf project by calling find_all_files method
511+
#we want to use this before the creation of documents by the segmenter class
512+
self.find_all_files(self.root_dir)
510513

511514

512515
def _install_dependencies_from_container(self, manifest_path: Path, download_path: str):

src/vuln_analysis/tools/tests/test_transitive_code_search.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,13 @@ async def test_c_transitive_search():
281281
included_extensions=['**/*.c','**/*.h'],
282282
excluded_extensions=['**/*test*.c',"**/docs/**/*","**/doc/**/*"]
283283
)
284+
# set rpm cache directory
284285
RPMDependencyManager.get_instance().set_rpm_cache_dir(".cache/am_cache/rpms")
286+
# enable unit test mode
285287
RPMDependencyManager.get_instance().enableUnitTestMode()
288+
# set sbom list
286289
RPMDependencyManager.get_instance().sbom = sbom_list
290+
# run transitive code search
287291
result = await transitive_code_search_runner_coroutine("libxml2,xmlParseComment")
288292
(path_found, list_path) = result
289293
print(f"DEBUG: path_found = {path_found}")

0 commit comments

Comments
 (0)