summaryrefslogtreecommitdiff
path: root/tests/tstunt/dpkg-parsechangelog
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-05-30 13:50:54 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2015-05-31 12:21:36 +0100
commit2c1ecb5ed3ca22a8652408c4a1ad060bf2229675 (patch)
tree77439616bd3852a5e20fcb565515f771b05fcff1 /tests/tstunt/dpkg-parsechangelog
parent6d69f86475d897aaf3b565d24ceaf21640c615f7 (diff)
Test suite: Use stunt Dpkg::Changelog::Parse
This saves a further 13s. Overalll the stunt changelog machinery saves 28s out of 100s (in my example case, the current debpolicy-newreject).
Diffstat (limited to 'tests/tstunt/dpkg-parsechangelog')
-rwxr-xr-xtests/tstunt/dpkg-parsechangelog8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/tstunt/dpkg-parsechangelog b/tests/tstunt/dpkg-parsechangelog
index 2e0360d..c45b124 100755
--- a/tests/tstunt/dpkg-parsechangelog
+++ b/tests/tstunt/dpkg-parsechangelog
@@ -14,10 +14,16 @@
# sys 0m0.012s
# $
+my $infile = "debian/changelog";
+
+if (@ARGV && $ARGV[0] =~ s/^-l//) {
+ $infile = shift @ARGV;
+}
+
die if @ARGV;
use strict;
-open C, "debian/changelog" or die $!;
+open C, $infile or die $!;
$!=0; $_ = <C>;
m/^(\S+) \(([^()]+)\) (\S+)\; urgency=(\S+)$/ or die "$!, $_ ?";