summaryrefslogtreecommitdiff
path: root/modules/execute-tests
Commit message (Collapse)AuthorAgeFilesLines
* execute: Fix test failure when running under QEMU user-mode.Bruno Haible2021-08-301-0/+2
| | | | | | | * tests/test-execute-child.c: Include <stdbool.h>, qemu.h. (main): Under QEMU user-mode, allow fd 3 to be open. * modules/execute-tests (Files): Add qemu.h. (Depends-on): Add stdbool.
* execute tests: Fix test failure when libtool is in use.Bruno Haible2021-08-251-0/+1
| | | | | | | | | * modules/execute-tests (Makefile.am): Link test-execute-child without using libtool. * modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child without using libtool. * modules/system-quote-tests (Makefile.am): Link test-system-quote-child without using libtool.
* execute tests: Avoid test failure in certain environments.Bruno Haible2021-04-081-0/+2
| | | | | | | | | Reported by Dmitry V. Levin <ldv@altlinux.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2021-04/msg00082.html>. * tests/test-execute-main.c (main): Close file descriptors 3..19. * tests/test-execute-child.c (main): Remove NetBSD workaround. * modules/execute-tests (configure.ac): Test for close_range function.
* windows-spawn: Improve errno upon failure on native Windows.Bruno Haible2020-12-241-0/+1
| | | | | | | | | | | | | | | * lib/windows-spawn.c (spawnpvech): Map the CreateProcess errors ERROR_BAD_FORMAT and ERROR_BAD_EXE_FORMAT to ENOEXEC. * tests/executable-script.sh: New file. * tests/test-posix_spawn-script.c (main): Also try executing executable-script.sh. * tests/test-posix_spawnp-script.c (main): Likewise. * tests/test-execute-script.c (main): Likewise. * tests/test-spawn-pipe-script.c (main): Likewise. * modules/posix_spawn-tests (Files): Add tests/executable-script.sh. * modules/posix_spawnp-tests (Files): Likewise. * modules/execute-tests (Files): Likewise. * modules/spawn-pipe-tests (Files): Likewise.
* Add unit tests regarding execution of scripts.Bruno Haible2020-12-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | * tests/executable-script: New file. * tests/executable-shell-script: New file. * tests/test-posix_spawn-script.c: New file. * tests/test-posix_spawnp-script.c: New file. * tests/test-execute-script.c: New file. * tests/test-spawn-pipe-script.c: New file. * modules/posix_spawn-tests (Files): Add tests/test-posix_spawn-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-posix_spawn-script. * modules/posix_spawnp-tests (Files): Add tests/test-posix_spawnp-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-posix_spawnp-script. * modules/execute-tests (Files): Add tests/test-execute-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-execute-script. * modules/spawn-pipe-tests (Files): Add tests/test-spawn-pipe-script.c, tests/executable-script, tests/executable-shell-script. (Makefile.am): Compile and run test-spawn-pipe-script.
* execute: Allow caller to specify directory for the subprocess.Bruno Haible2020-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | * lib/execute.h (execute): Add directory argument. * lib/execute.c: Include canonicalize.h, filename.h, findprog.h. (execute): Add directory argument. If specified, resolve the program file name and make it absolute, first. Pass the directory to spawnpvech and posix_spawn_file_actions_addchdir. * modules/execute (Depends-on): Add canonicalize, filename, findprog-in, posix_spawn, posix_spawn_file_actions_addchdir. * tests/test-execute-main.c: Add test for passing a directory. * tests/test-execute-child.c: Likewise. * tests/test-execute.sh: Update. * modules/execute-tests (Depends-on): Add mkdir. * NEWS: Mention the change. * lib/csharpcomp.c (compile_csharp_using_sscli): Update. * lib/csharpexec.c (execute_csharp_using_mono, execute_csharp_using_sscli): Update. * lib/javacomp.c (compile_using_envjavac, compile_using_gcj, compile_using_javac, compile_using_jikes, is_javac_present, is_jikes_present): Update. * lib/javaexec.c (execute_java_class): Update.
* execute: Add tests.Bruno Haible2020-11-291-0/+24
* tests/test-execute.sh: New file. * tests/test-execute-main.c: New file. * tests/test-execute-child.c: New file. * modules/execute-tests: New file.