From 2c1ecb5ed3ca22a8652408c4a1ad060bf2229675 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 30 May 2015 13:50:54 +0100 Subject: 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). --- tests/tstunt/dpkg-parsechangelog | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/tstunt/dpkg-parsechangelog') 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; $_ = ; m/^(\S+) \(([^()]+)\) (\S+)\; urgency=(\S+)$/ or die "$!, $_ ?"; -- cgit v1.2.1