blob: d1c29877b9b1e9c12aaf92b3a62d9f011c1d84af [file] [log] [blame]
Klement Sekera3747c752017-04-10 06:30:17 +02001#!/usr/bin/env python
2
3from __future__ import print_function
Klement Sekera909a6a12017-08-08 04:33:53 +02004from multiprocessing import Pipe
Klement Sekera3747c752017-04-10 06:30:17 +02005from sys import exit
Klement Sekera909a6a12017-08-08 04:33:53 +02006from hook import VppDiedError
7from framework import VppTestCase, KeepAliveReporter
Klement Sekera3747c752017-04-10 06:30:17 +02008
9
10class SanityTestCase(VppTestCase):
juraj.linkes185e6492018-11-28 14:30:34 +010011 """ Sanity test case - verify whether VPP is able to start """
Klement Sekera3747c752017-04-10 06:30:17 +020012 pass
13
14if __name__ == '__main__':
15 rc = 0
16 tc = SanityTestCase
Klement Sekera909a6a12017-08-08 04:33:53 +020017 x, y = Pipe()
18 reporter = KeepAliveReporter()
19 reporter.pipe = y
Klement Sekera3747c752017-04-10 06:30:17 +020020 try:
21 tc.setUpClass()
22 except VppDiedError:
23 rc = -1
24 else:
25 try:
26 tc.tearDownClass()
27 except:
28 pass
Klement Sekera909a6a12017-08-08 04:33:53 +020029 x.close()
30 y.close()
Klement Sekera3747c752017-04-10 06:30:17 +020031
juraj.linkesabec0122018-11-16 17:28:56 +010032 if rc == 0:
33 print('Sanity test case passed\n')
34 else:
35 print('Sanity test case failed\n')
36
Klement Sekera3747c752017-04-10 06:30:17 +020037 exit(rc)