tests/functional2: add framework for lang tests
This creates a framework similar to the old lang.sh from functional. Some notable changes: - instead of having a .flags file, a test.toml can declare flags - additionally the test.toml can also declare extra files and multiple runners for the given input file. - there won't be any old tests hanging around anymore which weren't deleted properly in the installation - all files for a single test are defined decleratively and there won't be any residues Tests can be placed within the functional2/lang folder most migrations should be rather clean Implements: #825 Change-Id: I5f9149903ec5b078008969a4ae77305417c11475
This commit is contained in:
@@ -66,3 +66,23 @@ def get_functional2_files_with_testlib(
|
||||
additional_files,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def get_functional2_lang_files(additional_files: FileDeclaration | None = None) -> FileDeclaration:
|
||||
if additional_files is None:
|
||||
additional_files = {}
|
||||
return get_functional2_files_with_testlib(
|
||||
merge_file_declaration(
|
||||
{
|
||||
"functional2": {
|
||||
"lang": {
|
||||
"__init__.py": CopyFile(functional2_base_folder / "lang/__init__.py"),
|
||||
"lang_util.py": CopyFile(functional2_base_folder / "lang/lang_util.py"),
|
||||
"test_lang.py": CopyFile(functional2_base_folder / "lang/test_lang.py"),
|
||||
"lib.nix": CopyFile(functional2_base_folder / "lang/lib.nix"),
|
||||
}
|
||||
}
|
||||
},
|
||||
additional_files,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user