summaryrefslogtreecommitdiff
path: root/tests/test_driver.pl
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2019-09-14 15:41:58 -0400
committerPaul Smith <psmith@gnu.org>2019-09-16 08:25:33 -0400
commit02a4c2913a47c988e958b965e53197feff281f38 (patch)
treedb6e1af045188b01e8f81b97fa18adfcc61a64bd /tests/test_driver.pl
parent8acb89c8c4c7a65dcd29719778cb759468738a6a (diff)
downloadmake-git-02a4c2913a47c988e958b965e53197feff281f38.tar.gz
* src/job.c (child_execute_job): Use errno from find_in_given_path().
* tests/test_driver.pl: Determine non-executable error message. * tests/scripts/features/errors: Use the local non-executable error.
Diffstat (limited to 'tests/test_driver.pl')
-rw-r--r--tests/test_driver.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_driver.pl b/tests/test_driver.pl
index 4af84daf..30e19435 100644
--- a/tests/test_driver.pl
+++ b/tests/test_driver.pl
@@ -68,6 +68,7 @@ if ($has_POSIX) {
$ERR_no_such_file = undef;
$ERR_read_only_file = undef;
$ERR_unreadable_file = undef;
+$ERR_noexe_file = undef;
if (open(my $F, '<', 'file.none')) {
print "Opened non-existent file! Skipping related tests.\n";
@@ -86,6 +87,13 @@ if (open(my $F, '>', 'file.out')) {
$ERR_read_only_file = "$!";
}
+$_ = `./file.out`;
+if ($? == 0) {
+ print "Executed non-executable file! Skipping related tests.\n";
+} else {
+ $ERR_nonexe_file = "$!";
+}
+
chmod(0000, 'file.out');
if (open(my $F, '<', 'file.out')) {
print "Opened unreadable file! Skipping related tests.\n";