summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-16 23:14:45 +0100
committerHarald Welte <laforge@osmocom.org>2019-12-17 13:49:28 +0100
commitc6a8697800376a02b868cdea8fc1bf55f12798f1 (patch)
treee42f7a62ae2a17efd8f10810dfc63d3e776c0809 /tests/Makefile.am
parent22c7ec3b60d6544d3042a115d519b9311b6bee45 (diff)
Introduce helper functions for safe fork+exec of processes
In some situations, we want to execute an external shell command in a non-blocking way. Similar to 'system', but without waiting for the child to complete. We also want to close all file descriptors ahead of the exec() and filter + modify the environment. Change-Id: Ib24ac8a083db32e55402ce496a5eabd8749cc888 Related: OS#4332
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3a3ea376..bf7017b1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -60,8 +60,10 @@ check_PROGRAMS += \
$(NULL)
endif
-if ENABLE_STATS_TEST
-check_PROGRAMS += stats/stats_test
+if !EMBEDDED
+check_PROGRAMS += \
+ stats/stats_test \
+ exec/exec_test
endif
if ENABLE_GB
@@ -259,6 +261,9 @@ use_count_use_count_test_LDADD = $(LDADD)
context_context_test_SOURCES = context/context_test.c
context_context_test_LDADD = $(LDADD)
+exec_exec_test_SOURCES = exec/exec_test.c
+exec_exec_test_LDADD = $(LDADD)
+
# The `:;' works around a Bash 3.2 bug when the output is not writeable.
$(srcdir)/package.m4: $(top_srcdir)/configure.ac
:;{ \
@@ -334,6 +339,7 @@ EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \
use_count/use_count_test.ok use_count/use_count_test.err \
context/context_test.ok \
gsm0502/gsm0502_test.ok \
+ exec/exec_test.ok exec/exec_test.err \
$(NULL)
DISTCLEANFILES = atconfig atlocal conv/gsm0503_test_vectors.c