def _get_sub_devices(rclass, testimage): try: tw = run_tests.TestWrapper(rclass, '/etc/localtime') except Exception as e: tw = run_tests.TestWrapper(rclass, testimage) rf = tw.do("get_features") if rf.has_sub_devices: return tw.do("get_sub_devices") else: return [rclass]
def _runtest(self, test): tw = run_tests.TestWrapper(self.RADIO_CLASS, self.testimage) testcase = test(tw) testcase.prepare() try: testcase.run() except run_tests.TestSkippedError as e: raise unittest.SkipTest(str(e)) finally: testcase.cleanup()
def _runtest(self, test): tw = run_tests.TestWrapper(self.RADIO_CLASS, self.testimage, dst=self.RADIO_INST) testcase = test(tw) testcase.prepare() try: failures = testcase.run() if failures: raise failures[0] except run_tests.TestCrashError as e: raise e.get_original_exception() except run_tests.TestSkippedError as e: raise unittest.SkipTest(str(e)) finally: testcase.cleanup()