diff options
author | Paul Smith <psmith@gnu.org> | 2016-04-04 01:16:13 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2016-04-04 01:38:37 -0400 |
commit | 65115e7095e1232e590c8920e7f828706a67fa4a (patch) | |
tree | 413a8dc1df268f4d1f636c649ceca47f9de1e4d6 /tests/run_make_tests.pl | |
parent | 75dd0bd8bc045493550841d540992049458b81c3 (diff) | |
download | make-git-65115e7095e1232e590c8920e7f828706a67fa4a.tar.gz |
* tests/run_make_tests.pl: Add file/lineno info to .run file.
Diffstat (limited to 'tests/run_make_tests.pl')
-rw-r--r-- | tests/run_make_tests.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl index 7005f10b..916f3467 100644 --- a/tests/run_make_tests.pl +++ b/tests/run_make_tests.pl @@ -140,6 +140,7 @@ sub subst_make_string sub run_make_test { local ($makestring, $options, $answer, $err_code, $timeout) = @_; + my @call = caller; # If the user specified a makefile string, create a new makefile to contain # it. If the first value is not defined, use the last one (if there is @@ -171,7 +172,7 @@ sub run_make_test } run_make_with_options($makefile, $options, &get_logfile(0), - $err_code, $timeout); + $err_code, $timeout, @call); &compare_output($answer, &get_logfile(1)); $old_makefile = $makefile; @@ -180,7 +181,8 @@ sub run_make_test # The old-fashioned way... sub run_make_with_options { - local ($filename,$options,$logname,$expected_code,$timeout) = @_; + my ($filename,$options,$logname,$expected_code,$timeout,@call) = @_; + @call = caller unless @call; local($code); local($command) = $make_path; @@ -231,7 +233,11 @@ sub run_make_with_options { $command .= " $options"; } - $command_string = "$command\n"; + $command_string = ""; + if (@call) { + $command_string = "#$call[1]:$call[2]\n"; + } + $command_string .= "$command\n"; if ($valgrind) { print VALGRIND "\n\nExecuting: $command\n"; |