Merge pull request #7901 from donaldsharp/pim_marking

tests: Fix to use global variable for pim marking
This commit is contained in:
Russ White 2021-01-26 07:39:02 -05:00 committed by GitHub
commit aee697b454
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 3 deletions

View File

@ -35,6 +35,8 @@ import json
import platform import platform
from functools import partial from functools import partial
pytestmark = pytest.mark.pimd
# Save the Current Working Directory to find configuration files. # Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__)) CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../")) sys.path.append(os.path.join(CWD, "../"))
@ -362,7 +364,7 @@ def config_hosts(tgen, hosts):
host = tgen.gears[host_name] host = tgen.gears[host_name]
config_host(host_name, host) config_host(host_name, host)
@pytest.mark.pim
def setup_module(module): def setup_module(module):
"Setup topology" "Setup topology"
tgen = Topogen(NetworkTopo, module.__name__) tgen = Topogen(NetworkTopo, module.__name__)

View File

@ -34,6 +34,8 @@ import pytest
import json import json
from functools import partial from functools import partial
pytestmark = pytest.mark.pimd
# Save the Current Working Directory to find configuration files. # Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__)) CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../")) sys.path.append(os.path.join(CWD, "../"))
@ -97,7 +99,7 @@ class NetworkTopo(Topo):
## ##
##################################################### #####################################################
@pytest.mark.pim
def setup_module(module): def setup_module(module):
"Setup topology" "Setup topology"
tgen = Topogen(NetworkTopo, module.__name__) tgen = Topogen(NetworkTopo, module.__name__)

View File

@ -56,6 +56,8 @@ import time
import datetime import datetime
import pytest import pytest
pytestmark = pytest.mark.pimd
# Save the Current Working Directory to find configuration files. # Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__)) CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../")) sys.path.append(os.path.join(CWD, "../"))

View File

@ -49,6 +49,8 @@ import datetime
from time import sleep from time import sleep
import pytest import pytest
pytestmark = pytest.mark.pimd
# Save the Current Working Directory to find configuration files. # Save the Current Working Directory to find configuration files.
CWD = os.path.dirname(os.path.realpath(__file__)) CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../")) sys.path.append(os.path.join(CWD, "../"))

View File

@ -31,6 +31,8 @@ import pytest
import json import json
from functools import partial from functools import partial
pytestmark = pytest.mark.pimd
CWD = os.path.dirname(os.path.realpath(__file__)) CWD = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(CWD, "../")) sys.path.append(os.path.join(CWD, "../"))
@ -80,7 +82,7 @@ class PIMTopo(Topo):
sw.add_link(tgen.gears["r1"]) sw.add_link(tgen.gears["r1"])
sw.add_link(tgen.gears["r3"]) sw.add_link(tgen.gears["r3"])
@pytest.mark.pim
def setup_module(mod): def setup_module(mod):
"Sets up the pytest environment" "Sets up the pytest environment"
tgen = Topogen(PIMTopo, mod.__name__) tgen = Topogen(PIMTopo, mod.__name__)