[PATCH] test: add make check

Derek Foreman derekf at osg.samsung.com
Mon Dec 21 12:48:49 PST 2015


We can now test all the protocol files by running make check (or distcheck)
which will pass them through the scanner.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 .gitignore   | 3 +++
 Makefile.am  | 6 ++++++
 test/scan.sh | 5 +++++
 3 files changed, 14 insertions(+)
 create mode 100755 test/scan.sh

diff --git a/.gitignore b/.gitignore
index e6f85d0..ca19ecf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,6 @@ missing
 *.pc
 autom4te.cache
 aclocal.m4
+*.trs
+*.log
+test-driver
diff --git a/Makefile.am b/Makefile.am
index 5926a41..3a88c39 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,3 +16,9 @@ dist_noinst_DATA =								\
 	$(NULL)
 
 noarch_pkgconfig_DATA = wayland-protocols.pc
+
+EXTRA_DIST = test/scan.sh
+
+TESTS = $(unstable_protocols)
+TEST_EXTENSIONS = .xml
+XML_LOG_COMPILER = $(srcdir)/test/scan.sh
diff --git a/test/scan.sh b/test/scan.sh
new file mode 100755
index 0000000..dc3dfc0
--- /dev/null
+++ b/test/scan.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+wayland-scanner client-header $1 /dev/null &&
+wayland-scanner server-header $1 /dev/null &&
+wayland-scanner code $1 /dev/null
-- 
2.6.4



More information about the wayland-devel mailing list