ipsec: IPSec protection for multi-point tunnel interfaces
[vpp.git] / test / sanity_run_vpp.py
1 #!/usr/bin/env python3
2
3 from __future__ import print_function
4 from multiprocessing import Pipe
5 import sys
6 import os
7 from framework import VppDiedError, VppTestCase, KeepAliveReporter
8
9
10 class SanityTestCase(VppTestCase):
11     """ Sanity test case - verify whether VPP is able to start """
12     pass
13
14     # don't ask to debug SanityTestCase
15     @classmethod
16     def wait_for_enter(cls, pid=0):
17         pass
18
19     @classmethod
20     def _debug_quit(cls):
21         try:
22             cls.vpp.poll()
23         except AttributeError:
24             pass
25
26
27 if __name__ == '__main__':
28     rc = 0
29     tc = SanityTestCase
30     x, y = Pipe()
31     reporter = KeepAliveReporter()
32     reporter.pipe = y
33     try:
34         tc.setUpClass()
35     except VppDiedError:
36         rc = -1
37     else:
38         try:
39             tc.tearDownClass()
40         except Exception:
41             rc = -1
42     x.close()
43     y.close()
44
45     if rc == 0:
46         print('Sanity test case passed.\n')
47     else:
48         print('Sanity test case failed.\n')
49
50     sys.exit(rc)