[PATCH] test: add make check

Emmanuel Gil Peyrot linkmauve at linkmauve.fr
Mon Dec 21 14:46:14 PST 2015


On Mon, Dec 21, 2015 at 02:48:49PM -0600, Derek Foreman wrote:
> 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

You should use /bin/sh instead, as you are not using any bash feature.

If you add the -e option to the shebang, you can also drop the && on
the next lines and the script will exit on any command not returning 0.

> +
> +wayland-scanner client-header $1 /dev/null &&
> +wayland-scanner server-header $1 /dev/null &&
> +wayland-scanner code $1 /dev/null
> --
> 2.6.4

With that done,
Reviewed-by: Emmanuel Gil Peyrot <linkmauve at linkmauve.fr>

Btw, shouldn’t the ML add a Reply-To field in the header to make the
MUA ask to answer it directly?  And sorry Derek for the double mail.

-- 
Emmanuel Gil Peyrot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151221/cb94b95d/attachment.sig>


More information about the wayland-devel mailing list