summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac10
-rw-r--r--test/Makefile.am10
4 files changed, 22 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index cabf9c95..3ea8576b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,3 +26,5 @@ src/libinput-version.h
doc/libinput.doxygen
doc/html
tags
+test/test-*
+test-driver
diff --git a/Makefile.am b/Makefile.am
index 4a2e09e5..07bfcd4c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS = src doc
+SUBDIRS = src doc test
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/configure.ac b/configure.ac
index 6d027708..0d34623a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,10 +59,18 @@ else
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$have_doxygen" = "xyes"])
+AC_ARG_ENABLE(tests,
+ AS_HELP_STRING([--enable-tests], [Build the tests (default=yes)]),
+ [build_tests="$enableval"],
+ [build_tests="yes"])
+
+AM_CONDITIONAL(BUILD_TESTS, [test "x$build_tests" = "xyes"])
+
AC_CONFIG_FILES([Makefile
doc/Makefile
doc/libinput.doxygen
src/Makefile
src/libinput.pc
- src/libinput-version.h])
+ src/libinput-version.h
+ test/Makefile])
AC_OUTPUT
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 00000000..444c1408
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,10 @@
+if BUILD_TESTS
+AM_CPPFLAGS = -I$(top_srcdir)/src
+
+run_tests =
+build_tests =
+
+noinst_PROGRAMS = $(build_tests) $(run_tests)
+TESTS = $(run_tests)
+
+endif