[vlc-devel] commit: CIL API sanity checks (well known to fail at the moment) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue May 27 19:25:13 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Tue May 27 20:26:46 2008 +0300| [f305f749f83e39c2671ef06415b968744c91b984]
CIL API sanity checks (well known to fail at the moment)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f305f749f83e39c2671ef06415b968744c91b984
---
bindings/cil/tests/Makefile.am | 4 ++-
bindings/cil/tests/missing_api | 41 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 1 deletions(-)
diff --git a/bindings/cil/tests/Makefile.am b/bindings/cil/tests/Makefile.am
index ab08d7b..116102d 100644
--- a/bindings/cil/tests/Makefile.am
+++ b/bindings/cil/tests/Makefile.am
@@ -1,7 +1,8 @@
EXTRA_DIST = $(SOURCES_testvlc)
MOSTLYCLEANFILES = $(check_SCRIPTS)
-check_SCRIPTS = testvlc.exe
+noinst_SCRIPTS = testvlc.exe
+dist_check_SCRIPTS = missing_api
SOURCES_testvlc = testvlc.cs
LDADD_testvlc = -lib:../src -r:VideoLAN.LibVLC.dll
@@ -9,3 +10,4 @@ LDADD_testvlc = -lib:../src -r:VideoLAN.LibVLC.dll
testvlc.exe: $(SOURCES_testvlc)
$(CSC) -target:exe -out:$@ $(CSFLAGS) $^ $(LDADD_testvlc)
+TESTS = missing_api
diff --git a/bindings/cil/tests/missing_api b/bindings/cil/tests/missing_api
new file mode 100755
index 0000000..ca9b858
--- /dev/null
+++ b/bindings/cil/tests/missing_api
@@ -0,0 +1,41 @@
+#! /bin/dash
+# Finds LibVLC API mismatch within the CIL bindings
+# Copyright 2008 Rémi Denis-Courmont
+
+if test "${srcdir}" = ""; then
+ srcdir="$(dirname "$0")"
+fi
+
+libvlcsym="${srcdir}/../../../src/libvlc.sym"
+if ! test -f "${libvlcsym}"; then
+ echo "Cannot find ${libvlcsym}\!" >&2
+ exit 77
+fi
+
+cat ${srcdir}/../src/*.cs | \
+sed -n -e 's,^.*EntryPoint="\([^"]*\)".*$,\1,p' | {
+ cat
+ # Symbols we do not need:
+ echo 'libvlc_exception_raise'
+} | \
+sort -u | \
+diff -u - "${libvlcsym}" | \
+grep -ve '^+\(mediacontrol_\|libvlc_playlist_\)' | {
+ read line # ---
+ read line # +++
+ broken=no
+ while read line; do
+ match="${line#+}"
+ if test "${line}" != "${match}"; then
+ echo "Unimplemented: $match"
+ broken=yes
+ fi
+
+ match="${line#-}"
+ if test "${line}" != "${match}"; then
+ echo "Invalid: $match"
+ broken=yes
+ fi
+ done
+ test "${broken}" = "no"
+}
More information about the vlc-devel
mailing list