From: Juergen Beisert <j...@pengutronix.de>

Only the serial tests require host and target python.

Signed-off-by: Juergen Beisert <j...@pengutronix.de>
Signed-off-by: Alexander Aring <alex.ar...@gmail.com>
---
 configure.ac            | 20 +++++++++++++++-----
 test-serial/Makefile.am |  2 ++
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 89c2651..755b39a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,11 @@ AC_CONFIG_HEADER([config.h])
 # Test for new silent rules and enable only if they are available
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+AC_ARG_ENABLE([tests],
+       [AC_HELP_STRING([--disable-tests], [do not install the tests 
@<:@default=yes@:>@])],
+       [],
+       [enable_tests=yes])
+
 AC_ARG_WITH(zbtestdir, [AC_HELP_STRING([--with-zbtestdir],
            [directory where all test programs will be installed])],
            [zbtestdir=$withval],
@@ -77,11 +82,16 @@ AC_PROG_LIBTOOL
 AM_PROG_LEX
 AC_PROG_YACC
 AC_SUBST(LIBTOOL_DEPS)
-# Currently the scripts works with python2.x only
-# Check for this at first
-AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python)
-AM_PATH_PYTHON(,, [:])
-py_CHECK_MAJOR_VERSION([PYTHON_VERSION], [2])
+
+if test "x$enable_tests" == "xyes" ; then
+       # Currently the scripts works with python2.x only
+       # Check for this at first
+       AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python)
+       AM_PATH_PYTHON(,, [:])
+       py_CHECK_MAJOR_VERSION([PYTHON_VERSION], [2])
+fi
+AM_CONDITIONAL([PYTHON_AVAILABLE], [test "x$enable_tests" == "xyes"])
+
 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
 
 # Checks for libraries.
diff --git a/test-serial/Makefile.am b/test-serial/Makefile.am
index 5553ded..733d472 100644
--- a/test-serial/Makefile.am
+++ b/test-serial/Makefile.am
@@ -1,6 +1,8 @@
+if PYTHON_AVAILABLE
 include $(top_srcdir)/Makefile.common
 
 python_PYTHON = test_DQ.py
 tests = test_packets.py test_edscan.py test_recv.py test_trx.py
 zbtest_SCRIPTS = $(tests)
 EXTRA_DIST = $(tests)
+endif
-- 
1.8.5.3


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to