Rust: accept last integration test changes

Also make `--learn` work with the nested qltest tests.
This commit is contained in:
Paolo Tranquilli
2024-11-20 09:45:15 +01:00
parent e4f982c12c
commit 4fb028cbb2
7 changed files with 8 additions and 7 deletions

View File

@@ -1 +0,0 @@
| test.rs:4:1:7:1 | foo |

View File

@@ -0,0 +1 @@
| test.rs:4:1:7:1 | fn foo |

View File

@@ -1 +0,0 @@
| test.rs:1:1:1:11 | foo |

View File

@@ -0,0 +1 @@
| test.rs:1:1:1:11 | fn foo |

View File

@@ -1,2 +0,0 @@
| main.rs:1:1:1:12 | main |
| test.rs:1:1:1:11 | foo |

View File

@@ -0,0 +1,2 @@
| main.rs:1:1:1:12 | fn main |
| test.rs:1:1:1:11 | fn foo |

View File

@@ -6,16 +6,17 @@ import pytest
# (which skips `qltest.{sh,cmd}`)
@pytest.fixture(autouse=True)
def default_options(codeql, pytestconfig):
def default_options(codeql):
codeql.flags.update(
threads = 1,
show_extractor_output = True,
check_databases = False,
learn = pytestconfig.getoption("learn"),
learn = True,
)
@pytest.mark.parametrize("dir", ["lib", "main", "dependencies"])
def test(codeql, rust, dir):
def test(codeql, rust, expected_files, dir):
expected_files.add(f"{dir}/functions.expected", expected=".nested.expected")
codeql.test.run(dir)
def test_failing_cargo_check(codeql, rust):