6 import build # Brings in tvcm bindings.
12 class AllTestLoader(unittest.TestLoader):
13 def addTestsInDirToSuite(self, suite, start_dir, top_dir):
14 subsuite = self.discover(start_dir,
17 suite.addTest(subsuite)
19 def loadTestsFromModule(self, module, use_load_tests=True):
20 if module.__file__ == __file__:
21 suite = unittest.TestSuite()
22 self.addTestsInDirToSuite(suite,
23 os.path.join(os.path.dirname(__file__), "build"),
24 os.path.dirname(__file__))
25 tvcm_top_dir = os.path.join(os.path.dirname(__file__), "third_party", "tvcm")
26 self.addTestsInDirToSuite(suite,
27 os.path.join(tvcm_top_dir, "tvcm"),
30 return super(AllTestLoader, self).loadTestsFromModule(module, use_load_tests)
31 return unittest.main(testLoader=AllTestLoader())
33 if __name__ == '__main__':