summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_vlib.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/test_vlib.py b/test/test_vlib.py
index 3c6288c8eb1..8bc5f57a5d5 100644
--- a/test/test_vlib.py
+++ b/test/test_vlib.py
@@ -1,7 +1,9 @@
#!/usr/bin/env python3
import unittest
-
+import pexpect
+import time
+import signal
from framework import VppTestCase, VppTestRunner, running_extended_tests
from framework import running_gcov_tests
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
@@ -186,5 +188,21 @@ class TestVlib(VppTestCase):
else:
self.logger.info(cmd + " FAIL retval " + str(r.retval))
+ @unittest.skipUnless(running_gcov_tests, "part of code coverage tests")
+ def test_vlib_main_unittest(self):
+ """ Private Binary API Segment Test (takes 70 seconds) """
+
+ vat_path = self.vpp_bin + '_api_test'
+ vat = pexpect.spawn(vat_path, ['socket-name', self.api_sock])
+ vat.expect("vat# ", timeout=10)
+ vat.sendline('sock_init_shm')
+ vat.expect("vat# ", timeout=10)
+ vat.sendline('sh api cli')
+ vat.kill(signal.SIGKILL)
+ vat.wait()
+ self.logger.info("vat terminated, 70 second wait for the Reaper")
+ time.sleep(70)
+ self.logger.info("Reaper should be complete...")
+
if __name__ == '__main__':
unittest.main(testRunner=VppTestRunner)