Exemplo n.º 1
0
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]
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
 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()