diff options
author | B. Watson <urchlay@slackware.uk> | 2023-07-06 16:09:00 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-07-08 16:42:08 +0700 |
commit | 8159498005364f5c67d8024163d081d2c5be37ef (patch) | |
tree | 9aae8e8751e8584f347dc522e370c313065ba6f3 /system/mksh | |
parent | 49703e7c02f24fcd777f25aaa3557eea334ca2a0 (diff) |
system/mksh: Only run tests if stdin/out are TTYs.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/mksh')
-rw-r--r-- | system/mksh/mksh.SlackBuild | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/system/mksh/mksh.SlackBuild b/system/mksh/mksh.SlackBuild index ac0a66c68747e..ae3909e33e3cb 100644 --- a/system/mksh/mksh.SlackBuild +++ b/system/mksh/mksh.SlackBuild @@ -7,6 +7,9 @@ # Original author: Markus Reichelt, Aachen, DE # Now maintained by B. Watson <urchlay@slackware.uk> +# 20230706 bkw: +# - only run test.sh if both stdin and stdout are TTYs. + # 20230102 bkw: BUILD=2 # - take over maintenance. # - relicense as WTFPL. @@ -94,6 +97,13 @@ chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ +# 20230706 bkw: only run test.sh if stdin and stdout are TTYs, to avoid +# the test script hanging forever. +T=no +[ -t 0 -a -t 1 ] && T=yes +TESTS=${TESTS:-$T} +echo "=== run tests? $TESTS" + LDFLAGS="$LDFLAGS" \ CPPFLAGS="$CPPFLAGS" \ CFLAGS="$SLKCFLAGS" \ @@ -106,7 +116,7 @@ CC="$CC" \ # thanks alpine maintainers. # 20230102 bkw: make tests optional with TESTS=no. This is a maintainer-mode # option (saves me time if I'm repeatedly editing/running the script). -if [ "${TESTS:-yes}" = "yes" ]; then +if [ "$TESTS" = "yes" ]; then sed -i -e '/^name: selftest-tty-absent$/,/^---$/d' check.t ./test.sh -C regress:no-ctty fi |