summaryrefslogtreecommitdiff
path: root/tests/misc/help-version.sh
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2015-07-03 04:44:05 +0100
committerPádraig Brady <P@draigBrady.com>2015-07-03 13:02:21 +0100
commit1d4289b3c10f5d8002fd59a518fbb7b148794449 (patch)
tree2017d1fd33f5c92a9beb44dab5fdda5fb19f0813 /tests/misc/help-version.sh
parent970b89170206779e028fce6a28f0924c7e47bfd1 (diff)
downloadcoreutils-1d4289b3c10f5d8002fd59a518fbb7b148794449.tar.xz
tests: avoid side effects of $SHELL environment variable
Since non interactive shells don't generally set $SHELL, its value is propagated through the tests and may cause issues; for example if $SHELL implicitly adjusts $PATH when run. Instead we set $SHELL to that determined by the posix-shell module, and use that consistently for all test sub scripts, including those created thorugh the `split --filter` command. * tests/local.mk: Explicitly set $SHELL to $(PREFERABLY_POSIX_SHELL) which defaults to $CONFIG_SHELL and thus usually /bin/sh. * tests/envvar-check: Remove bash environment variables with side effects, in case /bin/bash was selected for $SHELL. * tests/misc/help-version.sh: Remove redundant initialization of $SHELL. * tests/install/strip-program.sh: Use $SHELL for sub script. * tests/misc/sort-compress-hang.sh: Likewise. * tests/misc/sort-compress-proc.sh: Likewise. * tests/misc/sort-compress.sh: Likewise. * tests/misc/timeout-group.sh: Likewise. * tests/rm/fail-eperm.xpl: Remove redundant elision of bash env vars. * tests/misc/pwd-long.sh: Likewise.
Diffstat (limited to 'tests/misc/help-version.sh')
-rwxr-xr-xtests/misc/help-version.sh6
1 files changed, 0 insertions, 6 deletions
diff --git a/tests/misc/help-version.sh b/tests/misc/help-version.sh
index e0dd721f9..78150374d 100755
--- a/tests/misc/help-version.sh
+++ b/tests/misc/help-version.sh
@@ -17,12 +17,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Ensure that $SHELL is set to *some* value and exported.
-# This is required for dircolors, which would fail e.g., when
-# invoked via debuild (which removes SHELL from the environment).
-test "x$SHELL" = x && SHELL=/bin/sh
-export SHELL
-
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
# Terminate any background processes