]>
Commit | Line | Data |
---|---|---|
ac60528b | 1 | #!/usr/bin/env python |
acddc0ed | 2 | # SPDX-License-Identifier: ISC |
ac60528b DS |
3 | |
4 | # | |
5 | # test_route_scale1.py | |
6 | # | |
7 | # Copyright (c) 2021 by | |
8 | # Nvidia, Inc. | |
9 | # Donald Sharp | |
10 | # | |
ac60528b DS |
11 | |
12 | """ | |
13 | test_route_scale1.py: Testing route scale | |
14 | ||
15 | """ | |
16 | import os | |
17 | import re | |
18 | import sys | |
19 | import pytest | |
20 | import json | |
21 | from functools import partial | |
22 | ||
23 | # Save the Current Working Directory to find configuration files. | |
24 | CWD = os.path.dirname(os.path.realpath(__file__)) | |
25 | sys.path.append(os.path.join(CWD, "../")) | |
26 | ||
27 | # pylint: disable=C0413 | |
28 | # Import topogen and topotest helpers | |
29 | from lib import topotest | |
30 | from lib.topogen import Topogen, TopoRouter, get_topogen | |
31 | from lib.topolog import logger | |
32 | ||
33 | from scale_test_common import scale_build_common, scale_setup_module, route_install_helper, scale_test_memory_leak, scale_converge_protocols, scale_teardown_module | |
34 | ||
35 | ||
36 | pytestmark = [pytest.mark.sharpd] | |
37 | ||
38 | def build(tgen): | |
39 | scale_build_common(tgen) | |
40 | ||
41 | def setup_module(module): | |
42 | scale_setup_module(module) | |
43 | ||
44 | def teardown_module(_mod): | |
45 | scale_teardown_module(_mod) | |
46 | ||
47 | def test_converge_protocols(): | |
48 | scale_converge_protocols() | |
49 | ||
50 | def test_route_install_2nh(): | |
51 | route_install_helper(1) | |
52 | ||
53 | def test_route_install_4nh(): | |
54 | route_install_helper(2) | |
55 | ||
56 | def test_route_install_16nh(): | |
57 | route_install_helper(4) | |
58 | ||
59 | def test_memory_leak(): | |
60 | scale_test_memory_leak() | |
61 | ||
62 | if __name__ == "__main__": | |
63 | args = ["-s"] + sys.argv[1:] | |
64 | sys.exit(pytest.main(args)) |