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