Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | |
| 3 | from __future__ import print_function |
Klement Sekera | 909a6a1 | 2017-08-08 04:33:53 +0200 | [diff] [blame] | 4 | from multiprocessing import Pipe |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 5 | from sys import exit |
Klement Sekera | 909a6a1 | 2017-08-08 04:33:53 +0200 | [diff] [blame] | 6 | from hook import VppDiedError |
| 7 | from framework import VppTestCase, KeepAliveReporter |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 8 | |
| 9 | |
| 10 | class SanityTestCase(VppTestCase): |
Klement Sekera | 03a3e76 | 2018-11-08 11:49:04 +0100 | [diff] [blame] | 11 | """ Sanity test case - verify if VPP is able to start """ |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 12 | pass |
| 13 | |
| 14 | if __name__ == '__main__': |
| 15 | rc = 0 |
| 16 | tc = SanityTestCase |
Klement Sekera | 909a6a1 | 2017-08-08 04:33:53 +0200 | [diff] [blame] | 17 | x, y = Pipe() |
| 18 | reporter = KeepAliveReporter() |
| 19 | reporter.pipe = y |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 20 | try: |
| 21 | tc.setUpClass() |
| 22 | except VppDiedError: |
| 23 | rc = -1 |
| 24 | else: |
| 25 | try: |
| 26 | tc.tearDownClass() |
| 27 | except: |
| 28 | pass |
Klement Sekera | 909a6a1 | 2017-08-08 04:33:53 +0200 | [diff] [blame] | 29 | x.close() |
| 30 | y.close() |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 31 | |
| 32 | exit(rc) |