From df614a9bdc3e4495197415192d4e69f890b6ae20 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 5 Jan 2014 10:23:47 +0100 Subject: [PATCH] tests: Document log file normalization a bit better Signed-off-by: Markus Armbruster --- tests/normalize.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/normalize.pl b/tests/normalize.pl index efdeae91..f2b2fd65 100755 --- a/tests/normalize.pl +++ b/tests/normalize.pl @@ -31,16 +31,18 @@ sub norm_ctime { while (<>) { chomp; - my $pfx = ''; - + # Strip log timestamp if ($opt_j || $opt_s) { die "$0: malformed line" unless /^$ctime_re /; $_ = substr($_, 25); } + # Split off prefix that is not to be normalized + my $pfx = ''; if ($opt_j) { die "$0: malformed line" unless substr($_, 10, 1) eq ' '; $pfx .= substr($_, 0, 11); + # Normalize only player output $_ = substr($_, 11); if (/(^output [^ ]* 1 )(.*)/) { $pfx .= $1;