Skip to content

Commit c61aeeb

Browse files
ChrisDrydensylvestre
authored andcommitted
Update run-gnu-test.sh
1 parent 556d55d commit c61aeeb

1 file changed

Lines changed: 1 addition & 22 deletions

File tree

util/run-gnu-test.sh

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,11 @@
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
3211
case "$OSTYPE" in
3312
*bsd*)

0 commit comments

Comments
 (0)