[vlc-commits] [Git][videolan/vlc][master] 2 commits: modules: meson: always store module manifest

Steve Lhomme (@robUx4) gitlab at videolan.org
Mon Feb 17 13:07:36 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
69d9ed32 by Alexandre Janniaux at 2025-02-17T12:46:59+00:00
modules: meson: always store module manifest

The module manifest is indexed by the name and allows checking whether a
given module has been declared or not. In particular, it's used by the
tests to check whether the module was enabled or not. For this feature
to work, it should always be stored and not just when the module is
actually enabled.

- - - - -
ca8a1dd2 by Alexandre Janniaux at 2025-02-17T12:46:59+00:00
test: meson: disable test when modules are disabled

This actually disable the tests when a module the test depends on is
being disabled, and display a warning listing the modules that were
missing for the test.

- - - - -


2 changed files:

- modules/meson.build
- test/meson.build


Changes:

=====================================
modules/meson.build
=====================================
@@ -388,6 +388,10 @@ foreach module : vlc_modules
         endif
     endforeach
 
+    vlc_plugins_manifest += {
+        module['name']: module
+    }
+
     if not module.get('enabled', true)
         continue
     endif
@@ -424,9 +428,6 @@ foreach module : vlc_modules
     vlc_plugins_targets += {
         module['name']: vlc_plugin
     }
-    vlc_plugins_manifest += {
-        module['name']: module
-    }
 endforeach
 
 # Rust/cargo common handling code


=====================================
test/meson.build
=====================================
@@ -42,18 +42,22 @@ foreach vlc_test: vlc_tests
     disabled_dependencies = []
     test_modules_deps = []
     foreach module_name : vlc_test.get('module_depends', [])
-        if module_name not in vlc_plugins_targets.keys()
+        if module_name not in vlc_plugins_manifest.keys()
             error('Test entry \'@0@\' cannot depend on non-existant VLC plugin \'@1@\''
                   .format(vlc_test['name'], module_name))
         endif
-        test_modules_deps += vlc_plugins_targets[module_name]
+
         if not vlc_plugins_manifest[module_name].get('enabled', true)
             disabled_dependencies += module_name
+        else
+            test_modules_deps += vlc_plugins_targets[module_name]
         endif
     endforeach
 
     if disabled_dependencies != []
         # TODO: mark as skipped
+        warning('Test \'@0@\' will be disabled, missing plugins: @1@'.format(
+                vlc_test['name'], ', '.join(disabled_dependencies)))
         continue
     endif
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/91eaf42ca74b28bc8ed7c4f52b99fa3fd0d52e6d...ca8a1dd2e9f38ae5d0ecae43be473d3a9af6a399

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/91eaf42ca74b28bc8ed7c4f52b99fa3fd0d52e6d...ca8a1dd2e9f38ae5d0ecae43be473d3a9af6a399
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list