Skip to content

Commit 059f217

Browse files
committed
fix(tests): use g++ to compile C and C++
1 parent 587c055 commit 059f217

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_sasts.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def update_sast_module_state() -> GeneratorType:
4747
TEST_CODES_DIR = Path("tests/testcodes").resolve()
4848
TEST_CODES = {
4949
"java": {"build_command": "javac {filename}"},
50-
"c": {"build_command": "bear -- gcc {filename}"},
50+
"c": {"build_command": "bear -- g++ {filename}"},
5151
}
5252

5353
ARTIFACTS_ARG = {"java": ".", "c": "compile_commands.json"}
@@ -139,7 +139,9 @@ def test_sasts_analyze(monkeypatch: pytest.MonkeyPatch) -> None | AssertionError
139139

140140
SAST_RESULTS[sast_name].append(Path(temp_dir).name)
141141

142-
result = runner.invoke(sast_cli, ["analyze", lang, "--artifacts", "."])
142+
result = runner.invoke(
143+
sast_cli, ["analyze", lang, "--artifacts", ARTIFACTS_ARG[lang]]
144+
)
143145
assert result.exit_code == 0
144146
assert "--overwrite" in result.output
145147

0 commit comments

Comments
 (0)