• Home
  • Raw
  • Download

Lines Matching refs:self

33     def __init__(self, test, msg):  argument
34 self.msg = msg
35 self.test = test
36 def getMsg(self): argument
37 return '\'%s\' - %s' % (self.test.path, self.msg)
40 def __init__(self, test, arch): argument
41 self.arch = arch
42 self.test = test
43 def getMsg(self): argument
44 return '[%s] \'%s\'' % (self.arch, self.test.path)
47 def __init__(self, test): argument
48 self.test = test
49 def getMsg(self): argument
50 return '\'%s\'' % self.test.path
93 def add(self, data): argument
96 self[key] = val
98 def __init__(self, name, data, base): argument
100 self.name = name;
101 self.group = ''
102 self.add(base)
103 self.add(data)
105 def equal(self, other): argument
107 log.debug(" [%s] %s %s" % (t, self[t], other[t]));
108 if t not in self or t not in other:
110 if not data_equal(self[t], other[t]):
114 def optional(self): argument
115 if 'optional' in self and self['optional'] == '1':
119 def diff(self, other): argument
121 if t not in self or t not in other:
123 if not data_equal(self[t], other[t]):
124 log.warning("expected %s=%s, got %s" % (t, self[t], other[t]))
141 def __init__(self, path, options): argument
147 self.path = path
148 self.test_dir = options.test_dir
149 self.perf = options.perf
150 self.command = parser.get('config', 'command')
151 self.args = parser.get('config', 'args')
154 self.ret = parser.get('config', 'ret')
156 self.ret = 0
159 self.arch = parser.get('config', 'arch')
160 log.warning("test limitation '%s'" % self.arch)
162 self.arch = ''
164 self.expect = {}
165 self.result = {}
167 self.load_events(path, self.expect)
169 def is_event(self, name): argument
175 def skip_test(self, myarch): argument
177 if self.arch == '':
182 arch_list = self.arch.split(',')
200 def load_events(self, path, events): argument
207 for section in filter(self.is_event, parser_event.sections()):
216 parser_base.read(self.test_dir + '/' + base)
222 def run_cmd(self, tempdir): argument
225 if self.skip_test(myarch):
226 raise Notest(self, myarch)
229 self.perf, self.command, tempdir, self.args)
232 log.info(" '%s' ret '%s', expected '%s'" % (cmd, str(ret), str(self.ret)))
234 if not data_equal(str(ret), str(self.ret)):
235 raise Unsup(self)
237 def compare(self, expect, result): argument
267 raise Fail(self, 'match failure');
282 raise Fail(self, 'group failure')
289 def resolve_groups(self, events): argument
301 def run(self): argument
306 self.run_cmd(tempdir);
311 self.load_events(f, self.result);
314 self.resolve_groups(self.expect);
315 self.resolve_groups(self.result);
318 self.compare(self.expect, self.result)
319 self.compare(self.result, self.expect)