summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2021-01-04 18:15:53 +0100
committerFrediano Ziglio <freddy77@gmail.com>2021-01-22 07:31:48 +0000
commitcf6121deb47e437aa566cfeb29a03da93c432394 (patch)
treef6ab89a3516eb2858ac59fe50c420c81a43c498b
parentc75dc5f3036bf51120367b4d5fd6b442989b1dc1 (diff)
meson: avoid unknown variable softhsm warning when missing test dependencies
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Acked-by: Frediano Ziglio <freddy77@gmail.com>
-rw-r--r--tests/meson.build44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 1b9a3eb..6ce13e3 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -11,15 +11,6 @@ modutil_dep = find_program('modutil', required: false)
openssl_dep = find_program('openssl', required: false)
softhsm_util_dep = find_program('softhsm2-util', required: false)
-if pkcs11_tool_dep.found() and p11tool_dep.found() and modutil_dep.found() and openssl_dep.found() and softhsm_util_dep.found()
- softhsm = custom_target(
- 'softhsm2.conf',
- command: find_program('setup-softhsm2.sh'),
- capture: true,
- output: 'setup-softhsm2.log',
- )
-endif
-
libcacard_test = executable(
'libcacard',
['libcacard.c', 'common.c'],
@@ -66,17 +57,26 @@ hwtests_test = executable(
dependencies: [libcacard_dep],
)
-test(
- 'hwtests',
- hwtests_test,
- depends: [softhsm],
- env: env,
-)
+if pkcs11_tool_dep.found() and p11tool_dep.found() and modutil_dep.found() and openssl_dep.found() and softhsm_util_dep.found()
+ softhsm = custom_target(
+ 'softhsm2.conf',
+ command: find_program('setup-softhsm2.sh'),
+ capture: true,
+ output: 'setup-softhsm2.log',
+ )
-# again with different softhsm configuration not allowing raw RSA signatures */
-test(
- 'hwtests_no_raw',
- hwtests_test,
- depends: [softhsm],
- env: env2,
-)
+ test(
+ 'hwtests',
+ hwtests_test,
+ depends: [softhsm],
+ env: env,
+ )
+
+ # again with different softhsm configuration not allowing raw RSA signatures */
+ test(
+ 'hwtests_no_raw',
+ hwtests_test,
+ depends: [softhsm],
+ env: env2,
+ )
+endif