def set_up(self): UseCaseBase.set_up(self) if self.__setup_script is not None: result, full_path = self.__get_script_path(self.__setup_script) if result == Global.FAILURE: return Global.FAILURE, "Cannot find %s" % self.__setup_script self.__setup_script = full_path result, full_path = self.__get_script_path(self.__run_script) if result == Global.FAILURE: return Global.FAILURE, "Cannot find %s" % self.__run_script self.__run_script = full_path if self.__teardown_script is not None: result, full_path = self.__get_script_path(self.__teardown_script) if result == Global.FAILURE: return Global.FAILURE, "Cannot find %s" % self.__teardown_script self.__teardown_script = full_path if self.__finalize_script is not None: result, full_path = self.__get_script_path(self.__finalize_script) if result == Global.FAILURE: return Global.FAILURE, "Cannot find %s" % self.__finalize_script self.__finalize_script = full_path verdict = Global.SUCCESS message = "Success" if self.__setup_script is not None: verdict, message = self.__exec_script(self.__setup_script) return verdict, message
def set_up(self): """ Execute the test """ UseCaseBase.set_up(self) time.sleep(self._duration) verdict = self.__get_step_verdict("SETUP") return_code = Verdict2Global.map[verdict] comment = "(SETUP) " + self._comment return return_code, comment
def set_up(self): UseCaseBase.set_up(self) return self.__run_cmds("SETUP_CMD", "SETUP_TIMEOUT", "SETUP_EXPECT_RESULT")