Add unit tests regarding execution of scripts.
[gnulib.git] / modules / posix_spawnp-tests
blob04ccdbb6cd8a966fd9e395700b9578da02e455d9
1 Files:
2 tests/test-posix_spawn-dup2-stdout.c
3 tests/test-posix_spawn-dup2-stdout.in.sh
4 tests/test-posix_spawn-dup2-stdin.c
5 tests/test-posix_spawn-dup2-stdin.in.sh
6 tests/test-posix_spawnp-script.c
7 tests/executable-script
8 tests/executable-shell-script
9 tests/signature.h
11 Depends-on:
12 posix_spawn_file_actions_init
13 posix_spawn_file_actions_adddup2
14 posix_spawn_file_actions_addclose
15 posix_spawn_file_actions_addopen
16 posix_spawn_file_actions_destroy
17 posix_spawnattr_init
18 posix_spawnattr_setsigmask
19 posix_spawnattr_setflags
20 posix_spawnattr_destroy
21 stdbool
22 unistd
23 sys_wait
24 dup
25 environ
26 sh-filename
27 sigprocmask
29 configure.ac:
30 AC_EGREP_CPP([notposix], [[
31 #if defined _MSC_VER || defined __MINGW32__
32   notposix
33 #endif
34   ]],
35   [posix_spawn_ported=no],
36   [posix_spawn_ported=yes])
37 AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
39 Makefile.am:
40 if POSIX_SPAWN_PORTED
41 TESTS += \
42   test-posix_spawn-dup2-stdout \
43   test-posix_spawn-dup2-stdin \
44   test-posix_spawnp-script
45 check_PROGRAMS += \
46   test-posix_spawn-dup2-stdout \
47   test-posix_spawn-dup2-stdin \
48   test-posix_spawnp-script
50 BUILT_SOURCES += test-posix_spawn-dup2-stdout.sh
51 test-posix_spawn-dup2-stdout.sh: test-posix_spawn-dup2-stdout.in.sh
52         $(AM_V_GEN)rm -f $@-t $@ && \
53         cp $(srcdir)/test-posix_spawn-dup2-stdout.in.sh $@-t && \
54         mv $@-t $@
55 MOSTLYCLEANFILES += test-posix_spawn-dup2-stdout.sh test-posix_spawn-dup2-stdout.sh-t
57 BUILT_SOURCES += test-posix_spawn-dup2-stdin.sh
58 test-posix_spawn-dup2-stdin.sh: test-posix_spawn-dup2-stdin.in.sh
59         $(AM_V_GEN)rm -f $@-t $@ && \
60         cp $(srcdir)/test-posix_spawn-dup2-stdin.in.sh $@-t && \
61         mv $@-t $@
62 MOSTLYCLEANFILES += test-posix_spawn-dup2-stdin.sh test-posix_spawn-dup2-stdin.sh-t
64 test_posix_spawnp_script_CPPFLAGS = $(AM_CPPFLAGS) -DSRCDIR=\"$(srcdir)/\"
65 endif