1#!/usr/bin/perl 2 3# Copyright (c) International Business Machines Corp., 2001 4# 5# This program is free software; you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation; either version 2 of the License, or 8# (at your option) any later version. 9# 10# This program is distributed in the hope that it will be useful, 11# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 13# the GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program; if not, write to the Free Software 17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 19# FILE : ltpoutput 20# DESCRIPTION : rips failures out of the output from PAN 21# HISTORY : 22# 10/20/2001 Paul Larson (plars@austin.ibm.com) 23# written 24 25(1 + $#ARGV) || die "Usage: ltpoutput FILE\n"; 26 27$buf = ""; 28foreach $_ (<>) { 29 $line = $_; 30 $buf = $buf . $line; 31 if($line =~ '<<<test_end>>>') { 32 if($buf =~ "termination_id=[^0]") { 33 $buf =~ tr/<>/-/; 34 print $buf; 35 } 36 $buf = ""; 37 } 38 if($line =~ "^pan reported") { 39 print $line; 40 } 41} 42