summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2016-03-23 01:26:55 -0400
committerPaul Smith <psmith@gnu.org>2016-03-23 01:26:55 -0400
commit40277b885082bd62e1e312bc1226a383df899802 (patch)
tree31528491366ff6cf45e0cfce91803a6aba0a5467
parent35047f824aaa655cb5ff0adec6478db688f277a9 (diff)
downloadmake-git-40277b885082bd62e1e312bc1226a383df899802.tar.gz
* tests/run_make_tests.pl: Preserve $make_command
* tests/scripts/options/dash-n: Use $make_command. This fixes a spurious failure when running tests with valgrind enabled.
-rw-r--r--tests/run_make_tests.pl2
-rw-r--r--tests/scripts/options/dash-n2
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index ff10c212..7005f10b 100644
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -465,6 +465,8 @@ sub set_more_defaults
# Set up for valgrind, if requested.
+ $make_command = $make_path;
+
if ($valgrind) {
my $args = $valgrind_args;
open(VALGRIND, "> valgrind.out")
diff --git a/tests/scripts/options/dash-n b/tests/scripts/options/dash-n
index dfed419d..02ae4a99 100644
--- a/tests/scripts/options/dash-n
+++ b/tests/scripts/options/dash-n
@@ -92,7 +92,7 @@ EOF
close(MAKEFILE);
&run_make_with_options($topmake, '-n --no-print-directory', &get_logfile);
-$answer = "$make_path -f \"$submake\" bar\ntouch inc\necho n --no-print-directory\n";
+$answer = "$make_command -f \"$submake\" bar\ntouch inc\necho n --no-print-directory\n";
&compare_output($answer, &get_logfile(1));
unlink('inc');