From 12e904941da806608800522c401095fb7901acda Mon Sep 17 00:00:00 2001 From: Justin Seyster Date: Thu, 2 Sep 2010 16:34:00 -0400 Subject: [PATCH] Hooked the run-testcase.py script into all the autoconf magic. Test cases can now be run with make check! --- Makefile.am | 2 +- configure.in | 8 ++++++++ test/Makefile.am | 6 ++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 test/Makefile.am diff --git a/Makefile.am b/Makefile.am index af437a6..b4b5bc3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS = src +SUBDIRS = src test diff --git a/configure.in b/configure.in index f8ea9d2..37460cc 100644 --- a/configure.in +++ b/configure.in @@ -20,8 +20,16 @@ AC_PROG_LIBTOOL # Get the plugin includes directory. AX_GCC_PLUGIN +# Python for test cases +AM_PATH_PYTHON([2.0], + , # Do nothing if Python is found. + AC_MSG_WARN([Could not find Python binary. Python 2.0 or newer is + required for test cases. Running make check will be disabled.])) +AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) + AC_CONFIG_FILES([Makefile src/Makefile + test/Makefile workspace/Makefile]) AC_OUTPUT diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..0dc11d0 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,6 @@ +if HAVE_PYTHON +TESTS_ENVIRONMENT = $(PYTHON) $(srcdir)/run-testcase.py --with-gcc=$(CC) \ + --with-ia-lib-dir=$(top_builddir)/src/.libs \ + --with-ia-src-dir=$(top_srcdir) +TESTS = int-types.xml +endif -- 2.43.0