Allow builds to install the test scripts for field debugging
authorInaky Perez-Gonzalez <inaky@linux.intel.com>
Thu, 3 Sep 2009 17:10:23 +0000 (10:10 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 10 Oct 2009 12:44:34 +0000 (14:44 +0200)
Makefile.am
configure.ac

index 0e13bf5..834d91d 100644 (file)
@@ -115,7 +115,7 @@ noinst_PROGRAMS += tools/wifi-scan tools/addr-test tools/tap-test
 tools_wifi_scan_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@
 endif
 
-EXTRA_DIST += test/get-state test/list-profiles test/list-services \
+test_scripts = test/get-state test/list-profiles test/list-services \
                test/connect-service test/list-connections \
                test/select-connection test/list-devices test/enable-device \
                test/disable-device test/start-scanning test/list-networks \
@@ -124,6 +124,13 @@ EXTRA_DIST += test/get-state test/list-profiles test/list-services \
                test/test-manager test/test-connman test/monitor-connman \
                test/monitor-services test/debug-connman
 
+if TEST
+testdir = $(pkglibdir)/test
+test_SCRIPTS = $(test_scripts)
+endif
+
+EXTRA_DIST += $(test_scripts)
+
 EXTRA_DIST += doc/overview-api.txt doc/behavior-api.txt \
                                doc/ipconfig-api.txt doc/plugin-api.txt \
                                doc/manager-api.txt doc/agent-api.txt \
index 7b98842..0884e80 100644 (file)
@@ -333,6 +333,10 @@ if (test "${enable_tools}" = "yes"); then
 fi
 AM_CONDITIONAL(TOOLS, test "${enable_tools}" = "yes")
 
+AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
+               [enable test/example scripts]), [enable_test=${enableval}])
+AM_CONDITIONAL(TEST, test "${enable_test}" = "yes")
+
 AC_ARG_ENABLE(fake, AC_HELP_STRING([--enable-fake],
                [enable fake device support]), [enable_fake=${enableval}])
 AM_CONDITIONAL(FAKE, test "${enable_fake}" = "yes")