Browse Source

modules: add test to validate vlc_modules_list

Add a test script that verifies all plugins listed in vlc_modules_list
exist at their specified paths. This catches issues like incorrect
library extensions on different platforms.
pull/199/head
Alexandre Janniaux 6 months ago
committed by Felix Paul Kühne
parent
commit
4d6c2bd163
  1. 4
      modules/Makefile.am
  2. 40
      modules/check_vlc_modules_list.sh

4
modules/Makefile.am

@ -5,11 +5,11 @@ pkglib_LTLIBRARIES =
noinst_HEADERS = noinst_HEADERS =
check_PROGRAMS = check_PROGRAMS =
pkglibexec_PROGRAMS = pkglibexec_PROGRAMS =
EXTRA_DIST = EXTRA_DIST = check_vlc_modules_list.sh
CLEANFILES = CLEANFILES =
SUBDIRS = SUBDIRS =
TESTS = TESTS = check_vlc_modules_list.sh
dist_noinst_SCRIPTS = module.rc.in dist_noinst_SCRIPTS = module.rc.in
EXTRA_LTLIBRARIES = EXTRA_LTLIBRARIES =

40
modules/check_vlc_modules_list.sh

@ -0,0 +1,40 @@
#!/bin/sh
# Copyright (C) Alexandre Janniaux <ajanni@videolabs.io>
#
# License: see COPYING
#
## Check that vlc_modules_list points to existing plugins
set -e
# When run from make check, we're in the modules build directory
MODULE_LIST="vlc_modules_list"
if [ ! -f "$MODULE_LIST" ]; then
echo "ERROR: $MODULE_LIST not found" >&2
exit 1
fi
errors=0
# Parse vlc_modules_list with format: plugin_name: relative/path/to/plugin.ext
while IFS= read -r line; do
[ -z "$line" ] && continue
plugin="${line%%: *}"
plugin_path="${line#*: }"
# Path is relative to top build directory, we're in modules/
full_path="../$plugin_path"
if [ ! -f "$full_path" ]; then
echo "MISSING: $plugin -> $full_path" >&2
errors=$((errors + 1))
fi
done < "$MODULE_LIST"
if [ $errors -gt 0 ]; then
echo "ERROR: $errors plugin(s) listed in vlc_modules_list not found" >&2
exit 1
fi
echo "OK: All plugins in vlc_modules_list exist"
Loading…
Cancel
Save