Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove CMD timestamps for --diff mode

  • Loading branch information...
commit 9ebd55f52289d5904fbde3b8838ca92c7271d9e9 1 parent 9e19b8b
Michael Rash authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 test/test-fwknop.pl
13 test/test-fwknop.pl
View
@@ -916,7 +916,8 @@ ()
&build_results_hash(\%current_tests, $output_dir);
&build_results_hash(\%previous_tests, "${output_dir}.last");
- for my $test_msg (keys %current_tests) {
+ for my $test_msg (sort {$current_tests{$a}{'num'} <=> $current_tests{$b}{'num'}}
+ keys %current_tests) {
my $current_result = $current_tests{$test_msg}{'pass_fail'};
my $current_num = $current_tests{$test_msg}{'num'};
if (defined $previous_tests{$test_msg}) {
@@ -938,15 +939,19 @@ ()
sub diff_results() {
my ($previous_num, $current_num) = @_;
- ### first edit out any valgrind "==354==" prefixes
- my $search_re = qw/^==\d+==\s/;
+ ### edit out any valgrind "==354==" prefixes
+ my $valgrind_search_re = qr/^==\d+==\s/;
+
+ ### remove CMD timestamps
+ my $cmd_search_re = qr/^\S+\s.*?\s\d{4}\sCMD\:/;
for my $file ("${output_dir}.last/${previous_num}.test",
"${output_dir}.last/${previous_num}_fwknopd.test",
"${output_dir}/${current_num}.test",
"${output_dir}/${current_num}_fwknopd.test",
) {
- system qq{perl -p -i -e 's|$search_re||' $file} if -e $file;
+ system qq{perl -p -i -e 's|$valgrind_search_re||' $file} if -e $file;
+ system qq{perl -p -i -e 's|$cmd_search_re|CMD:|' $file} if -e $file;
}
if (-e "${output_dir}.last/${previous_num}.test"
Please sign in to comment.
Something went wrong with that request. Please try again.