File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# `run-gnu-test.bash [TEST]`
33# run GNU test (or all tests if TEST is missing/null)
44
5- # spell-checker:ignore (env/vars) GNULIB SRCDIR SUBDIRS OSTYPE ; (utils) shellcheck gnproc greadlink setsid qfec
5+ # spell-checker:ignore (env/vars) GNULIB SRCDIR SUBDIRS OSTYPE ; (utils) shellcheck gnproc greadlink
66
77# ref: [How the GNU coreutils are tested](https://www.pixelbeat.org/docs/coreutils-testing.html) @@ <https://archive.is/p2ITW>
88# * note: to run a single test => `make check TESTS=PATH/TO/TEST/SCRIPT SUBDIRS=. VERBOSE=yes`
99
10- # This is added to run the GNU tests inside a PTY as a controlling terminal
11- if [ " ${INSIDE_TTY_WRAPPER:- 0} " -ne 1 ]; then
12-
13- export INSIDE_TTY_WRAPPER=1
14-
15- # Build the command string with proper shell quoting
16- cmd=" bash $( printf ' %q' " $0 " ) "
17- for arg in " $@ " ; do
18- cmd=" $cmd $( printf ' %q' " $arg " ) "
19- done
20-
21- # New session + PTY; re-run this script inside it
22- if command -v script > /dev/null 2>&1 ; then
23- setsid script -qfec " $cmd " /dev/null
24- else
25- echo " script(1) not available; skipping this test"
26- fi
27- fi
28-
29-
30-
3110# Use GNU version for make, nproc, readlink on *BSD
3211case " $OSTYPE " in
3312 * bsd* )
You can’t perform that action at this time.
0 commit comments