blob: 0cc56ff7b17b75f8eadd81f7153240532781a7e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Copyright 2002 Gentoo Technologies, Inc
# Distributed under the terms of the GNU General Public License v2.0
# Author Karl Trygve Kalleberg <karltk@gentoo.org>
class Test:
def __init__(self, formatter,options=None):
self.formatter = formatter
self.errors = []
self.warnings = []
def reset(self):
self.errors = []
self.warnings = []
def hasWarnings(self):
return len(self.warnings)
def hasErrors(self):
return len(self.errors)
def getDesc(self):
return self.desc
def getStatus(self):
if self.hasErrors():
return "failed"
else:
return "passed"
class Regex:
PN = "[a-zA-Z_.-]+"
PV = "[a-z0-9A-Z_.-]+"
P = PN + "-" + PV + "(-r[0-9]+)?"
category = "[a-z0-9]+-[a-z0-9]+"
full = category + "/" + P
|