1 # -*- coding: utf-8 -*-
3 ################################################################################
5 ## Copyright © International Business Machines Corp., 2007, 2008 ##
7 ## This program is free software; you can redistribute it and#or modify ##
8 ## it under the terms of the GNU General Public License as published by ##
9 ## the Free Software Foundation; either version 2 of the License, or ##
10 ## (at your option) any later version. ##
12 ## This program is distributed in the hope that it will be useful, but ##
13 ## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
14 ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
15 ## for more details. ##
17 ## You should have received a copy of the GNU General Public License ##
18 ## along with this program; if not, write to the Free Software ##
19 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
21 ## NAME: parse-football.py ##
23 ## DESCRIPTION: Log Parser for the sched_football.c test ##
25 ## AUTHOR: Chirag <chirag@linux.vnet.ibm.com ##
27 ################################################################################
29 from scripts
.parser
import *
31 class SchedFootballLog(Log
):
32 def __init__(self
,filename
):
33 Log
.__init
__(self
,filename
)
36 exp1
= "Final ball position"
38 for line
in self
.read():
50 sys
.exit("Usage : ./%s <logname>" % sys
.argv
[0])
54 log
= SchedFootballLog(log_file
)
55 sys
.exit("Result: %s " % (["FAIL", "PASS"][log
.eval()]))
57 if __name__
== "__main__":