Index: third_party/lcov/bin/gendesc |
diff --git a/third_party/lcov/bin/gendesc b/third_party/lcov/bin/gendesc |
index e7a8113293b8ea4c64ccc898d509e8caa0f9ee76..f4cfcbc52b9028eeed503d1afc8a7bbd29d821c6 100755 |
--- a/third_party/lcov/bin/gendesc |
+++ b/third_party/lcov/bin/gendesc |
@@ -41,7 +41,7 @@ use Getopt::Long; |
# Constants |
-our $lcov_version = "LCOV version 1.7"; |
+our $lcov_version = 'LCOV version 1.10'; |
our $lcov_url = "http://ltp.sourceforge.net/coverage/lcov.php"; |
our $tool_name = basename($0); |
@@ -67,6 +67,9 @@ our $input_filename; |
$SIG{__WARN__} = \&warn_handler; |
$SIG{__DIE__} = \&die_handler; |
+# Prettify version string |
+$lcov_version =~ s/\$\s*Revision\s*:?\s*(\S+)\s*\$/$1/; |
+ |
# Parse command line options |
if (!GetOptions("output-filename=s" => \$output_filename, |
"version" =>\$version, |
@@ -150,13 +153,13 @@ sub gen_desc() |
local *OUTPUT_HANDLE; |
my $empty_line = "ignore"; |
- open(INPUT_HANDLE, $input_filename) |
+ open(INPUT_HANDLE, "<", $input_filename) |
or die("ERROR: cannot open $input_filename!\n"); |
# Open output file for writing |
if ($output_filename) |
{ |
- open(OUTPUT_HANDLE, ">$output_filename") |
+ open(OUTPUT_HANDLE, ">", $output_filename) |
or die("ERROR: cannot create $output_filename!\n"); |
} |
else |
@@ -169,7 +172,7 @@ sub gen_desc() |
{ |
chomp($_); |
- if (/^\s*(\w[\w-]*)(\s*)$/) |
+ if (/^(\w[\w-]*)(\s*)$/) |
{ |
# Matched test name |
# Name starts with alphanum or _, continues with |