lb: remove api boilerplate
[vpp.git] / test / sanity_run_vpp.py
1 #!/usr/bin/env python
2
3 from __future__ import print_function
4 from multiprocessing import Pipe
5 from sys import exit
6 from framework import VppDiedError, VppTestCase, KeepAliveReporter
7
8
9 class SanityTestCase(VppTestCase):
10     """ Sanity test case - verify whether VPP is able to start """
11     pass
12
13 if __name__ == '__main__':
14     rc = 0
15     tc = SanityTestCase
16     x, y = Pipe()
17     reporter = KeepAliveReporter()
18     reporter.pipe = y
19     try:
20         tc.setUpClass()
21     except VppDiedError:
22         rc = -1
23     else:
24         try:
25             tc.tearDownClass()
26         except:
27             pass
28     x.close()
29     y.close()
30
31     if rc == 0:
32         print('Sanity test case passed\n')
33     else:
34         print('Sanity test case failed\n')
35
36     exit(rc)