2ee7d310a3504fb557740fa15e6ab7c980008d23
[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 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
15 if __name__ == '__main__':
16     os.environ["RND_SEED"] = "1"
17     rc = 0
18     tc = SanityTestCase
19     x, y = Pipe()
20     reporter = KeepAliveReporter()
21     reporter.pipe = y
22     try:
23         tc.setUpClass()
24     except VppDiedError:
25         rc = -1
26     else:
27         try:
28             tc.tearDownClass()
29         except:
30             pass
31     x.close()
32     y.close()
33
34     if rc == 0:
35         print('Sanity test case passed\n')
36     else:
37         print('Sanity test case failed\n')
38
39     exit(rc)