diff --git a/test/diff/generate.py b/test/diff/generate.py index 0a02441e5..16d935b12 100644 --- a/test/diff/generate.py +++ b/test/diff/generate.py @@ -204,7 +204,7 @@ def exec_on_repo(args, repo): for cmd in cmds: new_cmd = list(cmd.split(" ")) commands.append(f"{list2cmdline(new_cmd)}") - if repo["language"] == "python": + if "python" in repo["language"]: commands.append(create_python_venvs(repo, args.uv_location)) elif args.build and repo["build_cmd"]: cmds = repo["build_cmd"].split(";") @@ -411,19 +411,32 @@ def run_cdxgen(repo, output_dir): Returns: str: The repository data with cdxgen commands """ - cdxgen_cmd = [ - 'cdxgen', - "--no-include-formulation", - '-t', - repo['language'], - '-o', - Path.joinpath(output_dir, f'{repo["project"]}-bom.json'), - repo['repo_dir'] - ] + if repo["language"] == "python-c": + cdxgen_cmd = [ + "cdxgen", + "--no-include-formulation", + "-t", + "python", + "-t", + "c", + "-o", + Path.joinpath(output_dir, f"{repo['project']}-bom.json"), + repo["repo_dir"] + ] + else: + cdxgen_cmd = [ + "cdxgen", + "--no-include-formulation", + "-t", + repo['language'], + "-o", + Path.joinpath(output_dir, f"{repo['project']}-bom.json"), + repo["repo_dir"] + ] cmd = f"CDXGEN_DEBUG_MODE=debug {list2cmdline(cdxgen_cmd)}" if repo["cdxgen_vars"]: cmd = f"{repo['cdxgen_vars']} {cmd}" - if repo["language"] == "python": + if "python" in repo["language"]: if repo["package_manager"] == "poetry": cmd = f"VIRTUAL_ENV=$(poetry env list --full-path | grep -E -o '(/\S+)+/pypoetry/virtualenvs/\S+') {cmd}" else: diff --git a/test/diff/repos.csv b/test/diff/repos.csv index 4bbab9c9d..88b8fe20a 100644 --- a/test/diff/repos.csv +++ b/test/diff/repos.csv @@ -11,5 +11,5 @@ plantuml_17,https://github.com/plantuml/plantuml.git,java17,17,,gradle,,,gradle jazzer,https://github.com/CodeIntelligenceTesting/jazzer.git,java8,8,,bazelisk,7.3.0,sdk use java 8.0.432-tem,bazelisk build //:jazzer_release,BAZEL_CMD='bazelisk' BAZEL_TARGET=//:jazzer_release,3947707d7db7e5cae0c8cfaeb10bdfeb06fc32bb tinydb,https://github.com/msiemens/tinydb.git,python,"3.9.20,3.10.15,3.11.10,3.12.7","pyproject.toml,poetry.lock",poetry,,,poetry install,,10644a0e07ad180c5b756aba272ee6b0dbd12df8 funcy,https://github.com/Suor/funcy.git,python,"3.9.20,3.10.15",setup.py,pip,,rm test_requirements.txt,python setup.py install,,859056d039adea75c1c3550286437ce0b612fe92 -numpy,https://github.com/numpy/numpy.git,"python,c","3.9.20,3.10.15,3.11.10,3.12.7","setup.py,pyproject.toml",pip,,git submodule update --init,pip install .,,93fdebfcb4bc4cd53c959ccd0117a612d5f13f1a +numpy,https://github.com/numpy/numpy.git,python-c,"3.9.20,3.10.15,3.11.10,3.12.7","setup.py,pyproject.toml",pip,,git submodule update --init,pip install .,,93fdebfcb4bc4cd53c959ccd0117a612d5f13f1a requests,https://github.com/psf/requests.git,python,"3.9.20,3.10.15,3.11.10,3.12.7","setup.py",,,,pip install .,,23540c93cac97c763fe59e843a08fa2825aa80fd \ No newline at end of file