Commit 1f129324 authored by Colin Walters's avatar Colin Walters
Browse files

Switch installed-tests to use --enable-installed-tests configure option

This is a lot less traumatic for distributions, among other
things.

https://bugzilla.gnome.org/698935
parent fde823f9
......@@ -40,3 +40,5 @@ valgrind.gjs-tests.log
valgrind.gjs-unit.log
installed-tests/gjs-installed-tests
installed-tests/gjs-installed-tests.testmeta
jsunit
jsunit.test
installedtestmetadir = $(datadir)/installed-tests/gjs
installedtestmeta_DATA = all.test
installedtestmeta_DATA =
if BUILDOPT_INSTALL_TESTS
installedtestmeta_DATA += jsunit.test
endif
all.test: all.test.in Makefile
jsunit.test: installed-tests/jsunit.test.in Makefile
sed -e s,@pkglibexecdir\@,$(pkglibexecdir), < $< > $@.tmp && mv $@.tmp $@
gjsalltestsdir = $(pkglibexecdir)/tests
gjsalltests_PROGRAMS = all
gjsalltests_PROGRAMS =
if BUILDOPT_INSTALL_TESTS
gjsalltests_PROGRAMS += jsunit
endif
all_CFLAGS = $(AM_CFLAGS) $(GJS_CFLAGS)
all_LDADD = $(GJS_LIBS)
all_LDFLAGS = -rpath $(pkglibdir)
all_SOURCES = test/gjs-unit.c
jsunit_CPPFLAGS = $(AM_CPPFLAGS) -DPKGLIBDIR=\"$(pkglibdir)\"
jsunit_CFLAGS = $(AM_CFLAGS) $(GJS_CFLAGS) -I$(top_srcdir)
jsunit_LDADD = $(GJS_LIBS) libgjs.la
jsunit_LDFLAGS = -rpath $(pkglibdir)
jsunit_SOURCES = installed-tests/gjs-unit.c
privlibdir = $(pkglibdir)
privlib_LTLIBRARIES =
if BUILDOPT_INSTALL_TESTS
privlib_LTLIBRARIES += libregress.la libwarnlib.la libgimarshallingtests.la
endif
nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
libregress_la_CPPFLAGS = $(AM_CPPFLAGS)
......@@ -38,14 +49,18 @@ Regress-1.0.gir: libregress.la
Regress_1_0_gir_LIBS = libregress.la
Regress_1_0_gir_FILES = $(nodist_libregress_la_SOURCES)
Regress_1_0_gir_SCANNERFLAGS = --warn-all --warn-error $(libregress_scannerflags_includes) $(libregress_la_CPPFLAGS)
if BUILDOPT_INSTALL_TESTS
INTROSPECTION_GIRS += Regress-1.0.gir
endif
WarnLib-1.0.gir: libwarnlib.la
WarnLib_1_0_gir_LIBS = libwarnlib.la
WarnLib_1_0_gir_INCLUDES = Gio-2.0
WarnLib_1_0_gir_FILES = $(nodist_libwarnlib_la_SOURCES)
WarnLib_1_0_gir_SCANNERFLAGS = --c-include="warnlib.h" --symbol-prefix=warnlib_
if BUILDOPT_INSTALL_TESTS
INTROSPECTION_GIRS += WarnLib-1.0.gir
endif
GIMarshallingTests-1.0.gir: libgimarshallingtests.la
GIMarshallingTests_1_0_gir_LIBS = libgimarshallingtests.la
......@@ -54,32 +69,38 @@ GIMarshallingTests_1_0_gir_FILES = $(nodist_libgimarshallingtests_la_SOURCES)
GIMarshallingTests_1_0_gir_SCANNERFLAGS = --symbol-prefix=gi_marshalling_tests --warn-all --warn-error
INTROSPECTION_GIRS += GIMarshallingTests-1.0.gir
typelibdir = $(pkglibdir)
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
privtypelibdir = $(pkglibdir)
privtypelib_DATA =
if BUILDOPT_INSTALL_TESTS
privtypelib_DATA += $(INTROSPECTION_GIRS:.gir=.typelib)
endif
jstestsdir = $(pkglibdir)/js
jstests_DATA = \
test/js/test0010basic.js \
test/js/test0020importer.js \
test/js/test0030basicBoxed.js \
test/js/test0040mainloop.js \
test/js/testself.js \
test/js/testByteArray.js \
test/js/testClass.js \
test/js/testGDBus.js \
test/js/testEverythingBasic.js \
test/js/testEverythingEncapsulated.js \
test/js/testGIMarshalling.js \
test/js/testJS1_8.js \
test/js/testJSDefault.js \
test/js/testLang.js \
test/js/testLocale.js \
test/js/testMainloop.js \
test/js/testSignals.js \
test/js/testSystem.js \
test/js/testTweener.js \
test/js/testUnicode.js
jstests_DATA =
if BUILDOPT_INSTALL_TESTS
jstests_DATA += \
installed-tests/js/test0010basic.js \
installed-tests/js/test0020importer.js \
installed-tests/js/test0030basicBoxed.js \
installed-tests/js/test0040mainloop.js \
installed-tests/js/testself.js \
installed-tests/js/testByteArray.js \
installed-tests/js/testClass.js \
installed-tests/js/testGDBus.js \
installed-tests/js/testEverythingBasic.js \
installed-tests/js/testEverythingEncapsulated.js \
installed-tests/js/testGIMarshalling.js \
installed-tests/js/testJS1_8.js \
installed-tests/js/testJSDefault.js \
installed-tests/js/testLang.js \
installed-tests/js/testLocale.js \
installed-tests/js/testMainloop.js \
installed-tests/js/testSignals.js \
installed-tests/js/testSystem.js \
installed-tests/js/testTweener.js \
installed-tests/js/testUnicode.js
if ENABLE_CAIRO
jstests_DATA += test/js/testCairo.js
jstests_DATA += installed-tests/js/testCairo.js
endif
endif
......@@ -216,6 +216,7 @@ install-exec-hook:
(cd $(DESTDIR)$(bindir) && ln -sf gjs-console$(EXEEXT) gjs$(EXEEXT))
include Makefile-test.am
include Makefile-insttest.am
EXTRA_DIST += autogen.sh COPYING.LGPL
......
......@@ -165,6 +165,12 @@ LIBS=$LIBS_no_readline
AC_CHECK_FUNCS([backtrace])
AC_ARG_ENABLE(installed_tests,
AS_HELP_STRING([--enable-installed-tests],
[Install test programs (default: no)]),,
[enable_installed_tests=no])
AM_CONDITIONAL(BUILDOPT_INSTALL_TESTS, test x$enable_installed_tests = xyes)
dnl
dnl Tracing
dnl
......
*.la
*.lo
*.o
*.gir
*.typelib
*~
.deps/
.libs/
INSTALL
Makefile
Makefile.in
aclocal.m4
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
depcomp
gjs-1.0.pc
gjs-console
gjs-internals-1.0.pc
gjs-gi-1.0.pc
gjs-tests
gjs-unit
gjs/gjs.stp
gjs_gi_probes.h
install-sh
libtool
ltmain.sh
missing
stamp-h1
test_user_data
uninstalled-test-bus.conf
uninstalled-system-test-bus.conf
valgrind.gjs-tests.log
valgrind.gjs-unit.log
bin_PROGRAMS =
lib_LTLIBRARIES =
noinst_HEADERS =
noinst_LTLIBRARIES =
pkglibexec_PROGRAMS =
privlibdir = $(pkglibdir)
privlib_LTLIBRARIES =
BUILT_SOURCES =
CLEANFILES =
EXTRA_DIST =
TEST_PROGS =
INTROSPECTION_GIRS =
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
AM_CPPFLAGS = -DPKGLIBDIR=\"$(pkglibdir)\"
AM_CFLAGS = $(WARN_CFLAGS)
include Makefile-test.am
include $(INTROSPECTION_MAKEFILE)
#!/bin/sh
exec autoreconf -vfi
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([gjs-installed-tests], 1.36.0, [http://bugzilla.gnome.org/enter_bug.cgi?product=gjs])
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign])
AC_CONFIG_SRCDIR([autogen.sh])
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
# our first pkg-config invocation is conditional, ensure macros still work
PKG_PROG_PKG_CONFIG
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AM_DISABLE_STATIC
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
PKG_CHECK_MODULES([GJS], [gio-unix-2.0 >= 2.36 gjs-internals-1.0 >= 1.36.0])
GOBJECT_INTROSPECTION_REQUIRE([1.36.0])
GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
AC_SUBST(GI_DATADIR)
AC_ARG_WITH(cairo,
AS_HELP_STRING([--without-cairo], [Use cairo @<:@default=yes@:>@]),
[], [with_cairo=yes])
AS_IF([test x$with_cairo = xyes], [
PKG_CHECK_MODULES([GJS_CAIRO], [$gjs_cairo_packages], have_cairo=yes, have_cairo=no)
])
AM_CONDITIONAL(ENABLE_CAIRO, test x$have_cairo = xyes)
AS_IF([test x$have_cairo = xyes], [
AC_DEFINE([ENABLE_CAIRO],[1],[Define if you want to build with cairo support])
])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE_NAME $VERSION
GJS_CFLAGS: ${GJS_CFLAGS}
GJS_LIBS: ${GJS_LIBS}
])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment