def run(self): self._case.set_value("CONTINUE_RUN",False) self._case.set_value("REST_OPTION","none") self._case.set_value("HIST_OPTION","$STOP_OPTION") self._case.set_value("HIST_N","$STOP_N") stop_n = self._case.get_value("STOP_N") stop_option = self._case.get_value("STOP_OPTION") self._case.flush() logger.info("doing an %d %s initial test, no restarts written" % (stop_n, stop_option)) return SystemTestsCommon._run(self)
def _ers_second_phase(self): stop_n = self._case.get_value("STOP_N") stop_option = self._case.get_value("STOP_OPTION") rest_n = stop_n/2 + 1 stop_new = stop_n - rest_n expect(stop_new > 0, "ERROR: stop_n value %d too short %d %d"%(stop_new,stop_n,rest_n)) self._case.set_value("STOP_N", stop_new) self._case.set_value("CONTINUE_RUN", True) self._case.set_value("REST_OPTION","never") self._case.flush() logger.info("doing an %s %s restart test" %(str(stop_n), stop_option)) success = SystemTestsCommon._run(self, "rest") # Compare restart file if success: return self._component_compare_test("base", "rest") else: return False