mirror of
https://github.com/mirror/make.git
synced 2025-01-27 21:00:22 +08:00
* tests/run_make_tests.pl: Add file/lineno info to .run file.
This commit is contained in:
parent
75dd0bd8bc
commit
65115e7095
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user