-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Split tests into integration and unit tests
Instead of seperating them on the fact that some are C and some are python, seperate them by what kind of tests they are. In this case, all C tests are unit tests and all pytest tests are integration tests.
- Loading branch information
1 parent
005da4c
commit e8a7a43
Showing
1 changed file
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,9 @@ test_permission_db = executable( | |
install_dir: installed_tests_dir, | ||
) | ||
test( | ||
'test-permission-db', | ||
'unit/permission-db', | ||
test_permission_db, | ||
suite: ['unit'], | ||
env: env_tests, | ||
is_parallel: false, | ||
protocol: test_protocol, | ||
|
@@ -38,8 +39,9 @@ test_xdp_utils = executable( | |
install_dir: installed_tests_dir, | ||
) | ||
test( | ||
'test-xdp-utils', | ||
'unit/xdp-utils', | ||
test_xdp_utils, | ||
suite: ['unit'], | ||
env: env_tests, | ||
is_parallel: false, | ||
protocol: test_protocol, | ||
|
@@ -55,8 +57,9 @@ test_method_info = executable( | |
install_dir: installed_tests_dir, | ||
) | ||
test( | ||
'test-xdp-method-info', | ||
'unit/xdp-method-info', | ||
test_method_info, | ||
suite: ['unit'], | ||
env: env_tests, | ||
is_parallel: true, | ||
protocol: test_protocol, | ||
|
@@ -131,13 +134,13 @@ template_files = [ | |
] | ||
|
||
foreach pytest_file : pytest_files | ||
testname = pytest_file.replace('.py', '') | ||
testname = pytest_file.replace('.py', '').replace('test_', '') | ||
test( | ||
'pytest/@0@'.format(testname), | ||
'integration/@0@'.format(testname), | ||
pytest, | ||
args: [meson.current_source_dir()] + pytest_args + ['-k', testname], | ||
env: pytest_env, | ||
suite: ['pytest'], | ||
suite: ['integration'], | ||
timeout: 120, | ||
) | ||
endforeach | ||
|
@@ -167,7 +170,7 @@ if enable_installed_tests | |
endforeach | ||
|
||
foreach pytest_file : pytest_files | ||
testname = pytest_file.replace('.py', '') | ||
testname = pytest_file.replace('.py', '').replace('test_', '') | ||
|
||
exec = [pytest.full_path(), installed_tests_dir / 'tests' / pytest_file] | ||
exec += pytest_args | ||
|
@@ -181,7 +184,7 @@ if enable_installed_tests | |
|
||
configure_file( | ||
input: 'template.test.in', | ||
output: '@[email protected]'.format(testname), | ||
output: 'integration-@[email protected]'.format(testname), | ||
configuration: data, | ||
install: true, | ||
install_dir: installed_tests_data_dir, | ||
|