Hooked the run-testcase.py script into all the autoconf magic.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Thu, 2 Sep 2010 20:34:00 +0000 (16:34 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Thu, 2 Sep 2010 20:34:00 +0000 (16:34 -0400)
Test cases can now be run with make check!

Makefile.am
configure.in
test/Makefile.am [new file with mode: 0644]

index af437a64d6d80a47ea903fd842a648fc59cbcd9a..b4b5bc309788390cdb7dbab2e0d77dfd9580296c 100644 (file)
@@ -1 +1 @@
-SUBDIRS = src
+SUBDIRS = src test
index f8ea9d28860667f792ddfde583a922c70f114abb..37460cc8980458d8ffdad4625d191c19478e6641 100644 (file)
@@ -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 (file)
index 0000000..0dc11d0
--- /dev/null
@@ -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