8 from threading import Thread
9 from log import single_line_delim
10 from framework import VppTestCase, running_extended_tests, \
11 running_on_centos, VppTestRunner, Worker
14 @unittest.skipUnless(running_extended_tests(), "part of extended tests")
15 class VOMTestCase(VppTestCase):
16 """ VPP Object Model Test """
18 def test_vom_cpp(self):
19 """ run C++ VOM tests """
21 built_root = os.getenv(var, None)
22 self.assertIsNotNone(built_root,
23 "Environment variable `%s' not set" % var)
24 executable = "%s/vom_test/vom_test" % built_root
26 [executable, "vpp object model", self.shm_prefix], self.logger)
30 self.logger.info("Worker result is `%s'" % worker.result)
32 if worker.result is None:
36 "Timeout! Worker did not finish in %ss" % timeout)
37 os.killpg(os.getpgid(worker.process.pid), signal.SIGTERM)
40 raise Exception("Couldn't kill worker-spawned process")
43 "Timeout! Worker did not finish in %ss" % timeout)
44 self.assert_equal(worker.result, 0, "Binary test return code")
47 if __name__ == '__main__':
48 unittest.main(testRunner=VppTestRunner)