Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | #!/usr/bin/perl -wl |
2 | ############################################################################### | |
d44e3c4f | 3 | # Copyright (c) 2000-2016 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 | |
d44e3c4f | 8 | # |
9 | # Contributors: | |
10 | # Balasko, Jeno | |
11 | # Baranyi, Botond | |
12 | # Delic, Adam | |
13 | # Raduly, Csaba | |
14 | # | |
970ed795 EL |
15 | ############################################################################### |
16 | ||
17 | use strict; | |
18 | my $exename; | |
19 | my $dirname; | |
20 | ||
21 | # collect lines that mean errors into this list | |
22 | my @output; | |
23 | ||
24 | while (<>) | |
25 | { | |
26 | chomp; | |
27 | ||
28 | if (/\.\/(\S+)\s+\S+\.cfg/) | |
29 | { | |
30 | $exename = $1; # single mode run directly | |
31 | } | |
32 | elsif (/ttcn3_start\s+(\S+)\s\S+\.cfg/) { | |
33 | $exename = $1; # parallel mode via ttcn3_start | |
34 | } | |
35 | elsif (/Entering directory `([^']+)'/) { # from make | |
36 | $dirname = $1; | |
37 | } | |
38 | ||
39 | if ( s/(?:\S+@\S+:\s+)?(Verdict statistics: \d+ none \(\d+\.\d+ %\), \d+ pass \((\d+)\.\d+ %\).*)/$1/ ) | |
40 | # filter out "MTC@host: " on the verdict statistics line in parallel mode | |
41 | { | |
42 | if ($2 ne '100') { | |
43 | push @output, $exename.": ".$_; | |
44 | } | |
45 | } | |
46 | elsif (/Looks like/) { | |
47 | push @output, "$_ in $dirname"; | |
48 | } | |
49 | } | |
50 | ||
51 | my $errorCount = 0; | |
52 | foreach my $line (@output) { | |
3f84031e | 53 | # filter out the Tverdictoper and logger results which are not supposed to be 100% pass |
54 | 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 | |
55 | $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 | |
56 | $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 | |
57 | $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 |
58 | print $line; |
59 | $errorCount++; | |
60 | } | |
61 | } | |
62 | ||
63 | exit $errorCount; | |
64 | ||
65 | __END__ | |
66 | ||
67 | Find verdict statistics which are not 100% pass. | |
68 | Augment with the executable name collected earlier. | |
69 |