summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2022-10-25 14:46:58 -0400
committerPaul Smith <psmith@gnu.org>2022-10-25 14:49:10 -0400
commitcf78e65fdaff051640ae9a83130d139aeb690e28 (patch)
treeaead60dfa9375d19105c39ee68b3b9dfc72cd94b /tests
parent04f0d8427f590b8eafa49c97f96fd954778c1871 (diff)
downloadmake-git-cf78e65fdaff051640ae9a83130d139aeb690e28.tar.gz
* tests/scripts/features/exec: Don't test with C shells
Using C shells (csh, tcsh) with make is known to be problematic due to incorrect ways it handles open file descriptors, at least. If the user's shell is *csh then don't try it during exec tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/features/exec14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/scripts/features/exec b/tests/scripts/features/exec
index 29cba02a..f139cf8c 100644
--- a/tests/scripts/features/exec
+++ b/tests/scripts/features/exec
@@ -15,11 +15,19 @@ my $details = "The various shells that this test uses are the default"
$port_type eq 'UNIX' or return -1;
$^O =~ /cygwin/ and return -1;
+my @shbangs = ('', '#!/bin/sh', "#!$perl_name");
+my @shells = ('', 'SHELL=/bin/sh');
+
+# Try whatever shell the user has, as long as it's not a C shell.
+# The C shell is not usable with make, due to not correctly handling
+# file descriptors and possibly other issues.
my $usersh = $origENV{SHELL};
-my $answer = 'hello, world';
+if ($usersh !~ /csh/) {
+ push @shbangs, ("#!$usersh");
+ push @shells, ("SHELL=$usersh");
+}
-my @shbangs = ('', '#!/bin/sh', "#!$usersh", "#!$perl_name");
-my @shells = ('', 'SHELL=/bin/sh', "SHELL=$usersh");
+my $answer = 'hello, world';
# tests [0-11]
# Have a makefile with various SHELL= exec a shell program with varios