tests: skip aes test if elements not built
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 15 Sep 2021 03:57:30 +0000 (20:57 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Wed, 15 Sep 2021 06:15:44 +0000 (23:15 -0700)
In ext/aes/meson.build, the aes_dep will return
not-found if -Daes=disabled, regardless of whether
openssl is found or not.  Thus, we don't need a
separate check for the option.  This will also
ensure that aes_dep is always defined and we can
use it in the tests/check/meson.build unit.

Fixes #1660

v2: handle -Daes=disabled, too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2522>

ext/aes/meson.build
tests/check/meson.build

index c830492..a200b8d 100644 (file)
@@ -5,11 +5,6 @@ aes_sources = [
   'gstaesdec.c',
 ]
 
-aes_option = get_option('aes')
-if aes_option.disabled()
-  subdir_done()
-endif
-
 aes_cargs = []
 aes_dep = dependency('openssl', required : get_option('aes'))
 if aes_dep.found()
index 713b999..195761b 100644 (file)
@@ -18,12 +18,11 @@ nalutils_dep = gstcodecparsers_dep.partial_dependency (compile_args: true, inclu
 enable_gst_play_tests = get_option('gst_play_tests')
 libsoup_dep = dependency('libsoup-2.4', version : '>=2.48', required : enable_gst_play_tests,
   fallback : ['libsoup', 'libsoup_dep'])
-aes_dep = dependency('openssl', required : false)
 
 # name, condition when to skip the test and extra dependencies
 base_tests = [
-  [['elements/aesenc.c'], false, [aes_dep]],
-  [['elements/aesdec.c'], false, [aes_dep]],
+  [['elements/aesenc.c'], not aes_dep.found(), [aes_dep]],
+  [['elements/aesdec.c'], not aes_dep.found(), [aes_dep]],
   [['elements/aiffparse.c']],
   [['elements/asfmux.c']],
   [['elements/autoconvert.c']],