-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- This way test setup runs during meson test and not the compile test - This way it runs only once I tried with add_test_setup() but that would cause the setup programs to be re-executed before each and every test Signed-off-by: Simo Sorce <[email protected]>
- Loading branch information
Showing
1 changed file
with
13 additions
and
19 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 |
---|---|---|
|
@@ -30,25 +30,20 @@ if nss_softokn.found() | |
endif | ||
endif | ||
|
||
softoken_conf = custom_target( | ||
'generate softoken configuration', | ||
output: 'tmp.softokn.log', | ||
env: conf_env, | ||
command: [ | ||
find_program('setup-softokn.sh'), | ||
], | ||
capture: true, | ||
) | ||
test_setup = { | ||
'setup_softokn': {'suite': 'softokn', 'exe': find_program('setup-softokn.sh')}, | ||
'setup_softhsm': {'suite': 'softhsm', 'exe': find_program('setup-softhsm.sh')}, | ||
} | ||
|
||
softhsm_conf = custom_target( | ||
'generate softhsm configuration', | ||
output: 'tmp.softhsm.log', | ||
env: conf_env, | ||
command: [ | ||
find_program('setup-softhsm.sh'), | ||
], | ||
capture: true, | ||
) | ||
foreach name, targs : test_setup | ||
test( | ||
name, | ||
targs.get('exe'), | ||
suite: targs.get('suite'), | ||
env: conf_env, | ||
is_parallel: false, | ||
) | ||
endforeach | ||
|
||
test_env = environment({ | ||
'TEST_PATH': meson.current_source_dir(), | ||
|
@@ -148,7 +143,6 @@ foreach t, extra_args : tests | |
test_wrapper, | ||
args: '@0@-@[email protected]'.format(t, suite), | ||
suite: suite, | ||
depends: [softoken_conf, softhsm_conf], | ||
env: test_env, | ||
is_parallel: is_parallel, | ||
) | ||
|