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): |
juraj.linkes | abec012 | 2018-11-16 17:28:56 +0100 | [diff] [blame] | 11 | """ Sanity test case - verify thether 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 | |
juraj.linkes | abec012 | 2018-11-16 17:28:56 +0100 | [diff] [blame] | 32 | if rc == 0: |
| 33 | print('Sanity test case passed\n') |
| 34 | else: |
| 35 | print('Sanity test case failed\n') |
| 36 | |
Klement Sekera | 3747c75 | 2017-04-10 06:30:17 +0200 | [diff] [blame] | 37 | exit(rc) |