Edit

kc3-lang/gnulib/tests/test-execute.sh

Branch :

  • Show log

    Commit

  • Author : Bruno Haible
    Date : 2020-12-02 17:44:04
    Hash : 702cba00
    Message : execute: Allow caller to specify directory for the subprocess. * 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.

  • tests/test-execute.sh
  • #!/bin/sh
    
    st=0
    for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; do
      ${CHECKER} ./test-execute-main${EXEEXT} ./test-execute-child${EXEEXT} $i \
        || { echo test-execute.sh: test case $i failed >&2; st=1; }
    done
    exit $st