summaryrefslogtreecommitdiffstats
path: root/tests/topotests/route_scale/test_route_scale2.py
blob: e244d4fbbc02f154f2276330b7472fb337de053c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/env python
# SPDX-License-Identifier: ISC

#
# test_route_scale2.py
#
# Copyright (c) 2022 by
# Nvidia, Inc.
# Donald Sharp
#

"""
test_route_scale2.py: Testing route scale

"""
import os
import re
import sys
import pytest
import json
from functools import partial

# Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../"))

# pylint: disable=C0413
# Import topogen and topotest helpers
from lib import topotest
from lib.topogen import Topogen, TopoRouter, get_topogen
from lib.topolog import logger

from scale_test_common import (
    scale_build_common,
    scale_setup_module,
    route_install_helper,
    scale_test_memory_leak,
    scale_converge_protocols,
    scale_teardown_module,
)


pytestmark = [pytest.mark.sharpd]


def build(tgen):
    scale_build_common(tgen)


def setup_module(module):
    scale_setup_module(module)


def teardown_module(_mod):
    scale_teardown_module(_mod)


def test_converge_protocols():
    scale_converge_protocols()


def test_route_install_1nh():
    route_install_helper(0)


def test_route_install_8nh():
    route_install_helper(3)


def test_route_install_32nh():
    route_install_helper(5)


def test_memory_leak():
    scale_test_memory_leak()


if __name__ == "__main__":
    args = ["-s"] + sys.argv[1:]
    sys.exit(pytest.main(args))