blob: a7bedbbdcf0d3c6423ff34f5bf9fb1dc3c97964b [file] [log] [blame]
mbligh9bb92fe2007-09-12 15:54:23 +00001#!/usr/bin/python
2import os, re, db
3
4statuses = ['NOSTATUS', 'ERROR', 'ABORT', 'FAIL', 'WARN', 'GOOD']
5status_num = {}
6for x in range(0, len(statuses)):
7 status_num[statuses[x]] = x
8
9
10class job:
11 def __init__(self):
12 self.idx = None
13 self.tag = None
14 self.machine = None
15 self.tests = []
16
17
18class kernel:
19 fields = ['kernel_idx', 'kernel_hash', 'base', 'printable']
20
21 def __init__(self, db, where):
22 self.db = db
23 self.base = None
24 self.patches = []
25
26 db.select(fields, kernels,
27
28
29class patch:
30 def __init__(self):
31 self.spec = spec
32 self.reference = reference
33 self.hash = hash
34
35
36class test:
37 def __init__(self, dir, status, reason, kernel):
38 self.dir = dir
39 self.status = status
40 self.reason = reason
41 self.keyval = os.path.join(dir, 'results/keyval')
42 self.iterations = []
43 self.testname = re.sub(r'\..*', '', self.dir)
44 self.kernel = kernel
45
46
47class iteration:
48 def __init__(self, index, lines):
49 self.index = index
50 self.keyval = {}
51