def instrumentPost(self, problem, post,PUTName): instCommand =self.getInstrumentationCommand(problem, post, PUTName) instOutput = command_runner.runCommand(instCommand) buildCommand = self.getMsbuildCommand(problem) buildOutput = command_runner.runCommand(buildCommand)
def pcPostSaved(sender, instance, created, **kwargs): formattedMAC = [] for i in range(0, len(instance.mac), 2): formattedMAC.append(instance.mac[i:i + 2]) runCommand('dhcpdManager.py del %s && dhcpdManager.py add %s %s %s' %\ (instance.name, instance.name, ':'.join(formattedMAC), instance.ip)) return instance
def save_new(self, uname, realname): su = SysUser(user_name=uname, password=uname, realname=realname) @commit_on_success def _saveInner(): su.save() _saveInner() for cmd in getattr(su, '_deferredCMDs', []): runCommand(cmd)
def runTest(self): """ Runs a Test Case """ self.assertEqual(1, len(self._test) % 2, 'The length of test array must be odd') for i in range(0, len(self._test), 2): """ Going through tests array and filling the states and actions arrays. States are even 0, 2, 4 etc. Actions are odd 1, 2, 5 etc. """ state = self._test[i] #Verifies that the current machine state matches a given state. self._elem = verifier_runner.verifyState(self._config.states[state], self._amigo) if i < len(self._test)-1: action = self._test[i+1] # Running an action from actions dictionary command_runner.runCommand(self._config.actions[action], self._amigo)
def RunTeacher(self, problem, PUTName, precisFeatureList) -> List[FeatureVector]: args = self.GetExecCommand(problem.testDll, PUTName, problem.testNamespace, problem.testClass) pexOutput = command_runner.runCommand(args) self.reportBaseLocation = problem.testDebugFolder self.reportLocation = os.path.join(self.reportBaseLocation, self.ro, self.rn, "report.per") self.testsLocation = os.path.join(self.reportBaseLocation, self.ro, self.rn, "tests") #print (self.time) return self.ParseReport(problem.testDebugFolder, precisFeatureList)
def runTest(self): """ Runs a Test Case """ self.assertEqual(1, len(self._test) % 2, 'The length of test array must be odd') for i in range(0, len(self._test), 2): """ Going through tests array and filling the states and actions arrays. States are even 0, 2, 4 etc. Actions are odd 1, 2, 5 etc. """ state = self._test[i] #Verifies that the current machine state matches a given state. self._elem = verifier_runner.verifyState( self._config.states[state], self._amigo) if i < len(self._test) - 1: action = self._test[i + 1] # Running an action from actions dictionary command_runner.runCommand(self._config.actions[action], self._amigo)
def stop(self): runCommand()
def start(self): runCommand('wakeonlan -i %s.255 %s' % (NET_PART, self.formattedMAC()))
def status(self): return runCommand('ping -c 1 -W 1 %s' % self.ip) == 0
def pcPreDelete(sender, instance, **kwargs): runCommand('dhcpdManager.py del %s' % instance.name) return instance