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 |
Paul Vinciguerra | 496b0de | 2019-06-20 12:24:12 -0400 | [diff] [blame] | 6 | from framework import VppDiedError, VppTestCase, KeepAliveReporter |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 7 | |
| 8 | |
| 9 | class SanityTestCase(VppTestCase): |
juraj.linkes | 185e649 | 2018-11-28 14:30:34 +0100 | [diff] [blame] | 10 | """ Sanity test case - verify whether VPP is able to start """ |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 11 | pass |
| 12 | |
| 13 | if __name__ == '__main__': |
| 14 | rc = 0 |
| 15 | tc = SanityTestCase |
Klement Sekera | 909a6a1 | 2017-08-08 04:33:53 +0200 | [diff] [blame] | 16 | x, y = Pipe() |
| 17 | reporter = KeepAliveReporter() |
| 18 | reporter.pipe = y |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 19 | try: |
| 20 | tc.setUpClass() |
| 21 | except VppDiedError: |
| 22 | rc = -1 |
| 23 | else: |
| 24 | try: |
| 25 | tc.tearDownClass() |
| 26 | except: |
| 27 | pass |
Klement Sekera | 909a6a1 | 2017-08-08 04:33:53 +0200 | [diff] [blame] | 28 | x.close() |
| 29 | y.close() |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 30 | |
juraj.linkes | abec012 | 2018-11-16 17:28:56 +0100 | [diff] [blame] | 31 | if rc == 0: |
| 32 | print('Sanity test case passed\n') |
| 33 | else: |
| 34 | print('Sanity test case failed\n') |
| 35 | |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 36 | exit(rc) |