diff options
author | Matthew Booth <mbooth@redhat.com> | 2012-01-17 16:41:07 +0000 |
---|---|---|
committer | Matthew Booth <mbooth@redhat.com> | 2012-01-20 18:42:40 +0000 |
commit | e99a6a84834d924095a873514a159304091f2b1f (patch) | |
tree | a965331e98711aeacdc18bc69e9579e1acd17bd5 /gobject | |
parent | cce1bbb345978ac9e1813745cfee19bb3ce661e7 (diff) | |
download | libguestfs-e99a6a84834d924095a873514a159304091f2b1f.tar.gz libguestfs-e99a6a84834d924095a873514a159304091f2b1f.tar.xz libguestfs-e99a6a84834d924095a873514a159304091f2b1f.zip |
gobject: Add basic bindtests
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/Makefile.am | 11 | ||||
-rwxr-xr-x | gobject/run-bindtests | 27 |
2 files changed, 36 insertions, 2 deletions
diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 25441cf9..1b239b49 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -15,8 +15,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -BUILT_SOURCES = guestfs-gobject.h guestfs-gobject.c -EXTRA_DIST = $(BUILT_SOURCES) +BUILT_SOURCES = guestfs-gobject.h guestfs-gobject.c bindtests.js +EXTRA_DIST = \ + $(BUILT_SOURCES) \ + run-bindtests libname = libguestfs-gobject-1.0.la @@ -54,5 +56,10 @@ gir_DATA = $(INTROSPECTION_GIRS) typelibdir = $(libdir)/girepository-1.0 typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib) +TESTS = run-bindtests +TESTS_ENVIRONMENT = GJS=$(GJS) + +$(TESTS): $(typelib_DATA) + CLEANFILES = $(gir_DATA) $(typelib_DATA) endif diff --git a/gobject/run-bindtests b/gobject/run-bindtests new file mode 100755 index 00000000..3d27c144 --- /dev/null +++ b/gobject/run-bindtests @@ -0,0 +1,27 @@ +#!/bin/sh - +# libguestfs GObject bindings +# Copyright (C) 2012 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +set -e + +if [ -z "$GJS" ]; then + echo "GObject bind tests skipped: gjs is missing" + exit 0 +fi + +../run $GJS bindtests.js > bindtests.tmp +diff -u ${srcdir}/../bindtests bindtests.tmp |