[d-feet] Add a flag to not run the testsuite



commit 0655e153bf98bd02eff182552af45dee0327bdb2
Author: Jonh Wendell <jonh wendell linux intel com>
Date:   Tue Jun 11 11:05:10 2013 -0300

    Add a flag to not run the testsuite
    
    This adds the '--disable-tests' to the configure script so that
    the user can skip this step. The side effect is that the python-pep8
    package is not mandatory.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702014

 configure.ac    |   12 ++++++++++--
 src/Makefile.am |    6 +++++-
 2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 23d4364..648f8df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,8 +21,16 @@ PKG_CHECK_MODULES(DFEET, [
   gtk+-3.0 >= 3.6
 ])
 
-AC_CHECK_PROG([PEP8], [pep8], [yes])
-test -z "$PEP8" && AC_MSG_ERROR([pep8 binary not found but needed for testsuite])
+AC_ARG_ENABLE(tests,
+  AS_HELP_STRING([--disable-tests],
+                 [do not run tests]),
+    enable_tests=$enableval, enable_tests=yes)
+
+if test x$enable_tests = xyes; then
+  AC_CHECK_PROG([PEP8], [pep8], [yes])
+  test -z "$PEP8" && AC_MSG_ERROR([pep8 binary not found but needed for testsuite. either install it or run 
with the argument --disable-tests to not run the testsuite.])
+fi
+AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
 
 # i18n stuff
 IT_PROG_INTLTOOL([0.40.0])
diff --git a/src/Makefile.am b/src/Makefile.am
index d048d0f..9273765 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = dfeet tests
+SUBDIRS = dfeet
+
+if ENABLE_TESTS
+  SUBDIRS += tests
+endif
 
 bin_SCRIPTS = d-feet
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]