Lines Matching refs:self

23     def __init__(self, filename):  argument
24 self.filename = filename
25 self.f = open(self.filename, 'w+', 0)
27 def caption(self, str): argument
29 if self.f:
30 self.f.write("%s \n" % line)
34 def error(self, str): argument
36 if self.f:
37 self.f.write("%s \n" % data)
41 def log(self, str): argument
42 if self.f:
43 self.f.write("%s \n" % str)
54 def __init__(self, logfile, tests): argument
55 self.tests = tests
56 self.log = Log(logfile)
58 def shell(self, cmd, path=os.getcwd()): argument
62 self.log.log("==== shell session ===========================")
63 self.log.log("%s> %s" % (path, cmd))
65 stdout=self.log.f, stderr=self.log.f)
66 self.log.log("status = %s" % status)
67 self.log.log("============================================== \n\n")
70 def GetOutput(self, cmd, path=os.getcwd()): argument
74 self.log.log("==== shell session ===========================")
75 self.log.log("%s> %s" % (path, cmd))
77 self.log.log("status = %s" % status)
78 self.log.log("out = %s" % out)
79 self.log.log("============================================== \n\n")
89 def __init__(self, args): argument
90 Env.__init__(self, args.logfile, args.tests)
91 self.ignore_failure = args.ignore_failure
96 def get_commands(self, test): argument
97 status, out = self.GetOutput(
104 def run_test(self, test): argument
105 self.log.caption("Running test %s locally" % test)
108 status, cmds = self.get_commands(test)
110 self.log.error("Error getting commands for test %s" % test)
117 self.log.log("No commands found")
127 status = self.shell(cmd, ".")
129 self.log.error("Error running command %s for test %s"
138 def run_tests(self): argument
139 if not self.tests:
140 self.log.error("Invalid args. Please provide tests")
143 self.print_separator()
144 self.print_row("TEST", "RESULT")
145 self.print_separator()
148 for test in self.tests:
150 self.print_test(test)
151 result = self.run_test(test)
154 self.log.error("Error running test %s" % test)
155 self.print_result("FAIL (%dm)" % elapsed_min)
156 if not self.ignore_failure:
160 self.print_result("PASS (%dm)" % elapsed_min)
162 self.print_separator()
168 def print_separator(self): argument
174 def print_row(self, c0, c1): argument
177 def print_test(self, test): argument
181 def print_result(self, result): argument