Sync with 5.4.2
[deliverable/titan.core.git] / regression_test / vcheck.pl
CommitLineData
970ed795
EL
1#!/usr/bin/perl -wl
2###############################################################################
3abe9331 3# Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
4# All rights reserved. This program and the accompanying materials
5# are made available under the terms of the Eclipse Public License v1.0
6# which accompanies this distribution, and is available at
7# http://www.eclipse.org/legal/epl-v10.html
8###############################################################################
9
10use strict;
11my $exename;
12my $dirname;
13
14# collect lines that mean errors into this list
15my @output;
16
17while (<>)
18{
19 chomp;
20
21 if (/\.\/(\S+)\s+\S+\.cfg/)
22 {
23 $exename = $1; # single mode run directly
24 }
25 elsif (/ttcn3_start\s+(\S+)\s\S+\.cfg/) {
26 $exename = $1; # parallel mode via ttcn3_start
27 }
28 elsif (/Entering directory `([^']+)'/) { # from make
29 $dirname = $1;
30 }
31
32 if ( s/(?:\S+@\S+:\s+)?(Verdict statistics: \d+ none \(\d+\.\d+ %\), \d+ pass \((\d+)\.\d+ %\).*)/$1/ )
33 # filter out "MTC@host: " on the verdict statistics line in parallel mode
34 {
35 if ($2 ne '100') {
36 push @output, $exename.": ".$_;
37 }
38 }
39 elsif (/Looks like/) {
40 push @output, "$_ in $dirname";
41 }
42}
43
44my $errorCount = 0;
45foreach my $line (@output) {
3f84031e 46 # filter out the Tverdictoper and logger results which are not supposed to be 100% pass
47 unless ($line =~ /^TverdictOper(\.exe)?: Verdict statistics: 2 none \(8\.00 %\), 11 pass \(44\.00 %\), 5 inconc \(20\.00 %\), 7 fail \(28\.00 %\), 0 error \(0\.00 %\)\./ or
48 $line =~ /^EmergencyLogTest(\.exe)?: Verdict statistics: 3 none \(23\.08 %\), 10 pass \(76\.92 %\), 0 inconc \(0\.00 %\), 0 fail \(0\.00 %\), 0 error \(0\.00 %\)\./ or
49 $line =~ /^EmergencyLogTest(\.exe)?: Verdict statistics: 9 none \(17\.65 %\), 33 pass \(64\.71 %\), 0 inconc \(0\.00 %\), 0 fail \(0\.00 %\), 9 error \(17\.65 %\)\./ or
50 $line =~ /^Titan_LogTest(\.exe)?: Verdict statistics: 3 none \(23\.08 %\), 9 pass \(69\.23 %\), 0 inconc \(0\.00 %\), 0 fail \(0\.00 %\), 1 error \(7\.69 %\)\./) {
970ed795
EL
51 print $line;
52 $errorCount++;
53 }
54}
55
56exit $errorCount;
57
58__END__
59
60Find verdict statistics which are not 100% pass.
61Augment with the executable name collected earlier.
62
This page took 0.040897 seconds and 5 git commands to generate.