Lines Matching refs:self

73   def __init__(self, base_cmd, test_env, expected_retcode=None,  argument
84 self._base_cmd = base_cmd
85 self._test_env = test_env
86 self._expected_retcode = expected_retcode
87 self._output_checker = output_checker
88 self._compiled_methods_path = self._test_env.CreateFile('compiled_methods')
89 self._passes_to_run_path = self._test_env.CreateFile('run_passes')
90 self._verbose = verbose
91 if RAW_CMD_RUNTIME_ARGS_TAG in self._base_cmd:
92 self._arguments_position = self._base_cmd.index(RAW_CMD_RUNTIME_ARGS_TAG)
93 self._base_cmd.pop(self._arguments_position)
95 self._arguments_position = 1
97 def Test(self, compiled_methods, passes_to_run=None): argument
110 if self._verbose:
113 cmd = self._PrepareCmd(compiled_methods=compiled_methods,
115 (output, ret_code) = self._test_env.RunCommand(
118 if self._expected_retcode:
119 res = self._expected_retcode == ret_code
120 if self._output_checker:
121 res = res and self._output_checker.Check(output)
122 if self._verbose:
126 def GetAllMethods(self): argument
135 cmd = self._PrepareCmd()
136 (output, _) = self._test_env.RunCommand(cmd, LogSeverity.INFO)
143 def GetAllPassesForMethod(self, compiled_method): argument
155 cmd = self._PrepareCmd(compiled_methods=[compiled_method])
156 (output, _) = self._test_env.RunCommand(cmd, LogSeverity.INFO)
163 def _PrepareCmd(self, compiled_methods=None, passes_to_run=None): argument
165 cmd = self._base_cmd[0:self._arguments_position]
168 self._test_env.WriteLines(self._passes_to_run_path, passes_to_run)
170 self._passes_to_run_path)]
173 cmd += self._base_cmd[self._arguments_position:]
185 def Check(self, output): argument
199 def __init__(self, expected_output): argument
205 self._expected_output = expected_output
207 def Check(self, output): argument
209 return self._expected_output == output
220 def __init__(self, script_path, expected_output_path, logfile): argument
228 self._script_path = script_path
229 self._expected_output_path = expected_output_path
230 self._logfile = logfile
232 def Check(self, output): argument
239 [self._script_path, self._expected_output_path, temp_file.name],
240 stdout=self._logfile, stderr=self._logfile, universal_newlines=True)