From 2ba437ad3c692917f6f82cb36485b9ea9592a3fd Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 26 Sep 2017 12:52:15 +0200 Subject: [PATCH] Generate #line in all blocks Generate proper #line directives in all BEGIN_xxx blocks. Before, there were #line directives for BEGIN_SUITE_HELPERS and BEGIN_CASE but not BEGIN_HEADER, so debug information for code in the header block pointed inside helpers.function instead of the test's source file. --- tests/scripts/generate_code.pl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/scripts/generate_code.pl b/tests/scripts/generate_code.pl index e489a0055e..4c24c7c096 100755 --- a/tests/scripts/generate_code.pl +++ b/tests/scripts/generate_code.pl @@ -111,12 +111,7 @@ my @test_cases_lines = split/^/, ; my $test_cases; my $index = 2; for my $line (@test_cases_lines) { - if ($line =~ /^\/\* BEGIN_SUITE_HELPERS .*\*\//) - { - $line = $line."#line $index \"$test_case_file\"\n"; - } - - if ($line =~ /^\/\* BEGIN_CASE .*\*\//) + if ($line =~ /^\/\* BEGIN_.*\*\//) { $line = $line."#line $index \"$test_case_file\"\n"; }