]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgp_l3vpn_to_bgp_xxx: avoid collision of customize.py match lutil and ltemplate changes
authorLou Berger <lberger@labn.net>
Fri, 26 Jan 2018 14:05:48 +0000 (09:05 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:13 +0000 (20:22 -0500)
Signed-off-by: Lou Berger <lberger@labn.net>
tests/topotests/bgp_l3vpn_to_bgp_direct/test_bgp_l3vpn_to_bgp_direct.py
tests/topotests/bgp_l3vpn_to_bgp_vrf/test_bgp_l3vpn_to_bgp_vrf.py

index 050f222f88ee3b7881a201d7597dcc947f233635..b4f4ad26e2d93f200fad315a2a2156ec3f05e148 100755 (executable)
@@ -25,49 +25,48 @@ import os
 import sys
 import pytest
 
-CWD = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(CWD, '../'))
-sys.path.append(CWD)
+sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
 
 from lib.ltemplate import *
 
 def test_ltemplate_start():
-    ltemplate_start(CWD)
+    cwd = os.path.dirname(os.path.realpath(__file__))
+    ltemplate_start(cwd)
 
 def test_adjacencies():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/adjacencies.py', False, CliOnFail, CheckFunc)
 
 def test_add_routes():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/add_routes.py', False, CliOnFail, CheckFunc)
 
 def test_check_routes():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/check_routes.py', False, CliOnFail, CheckFunc)
 
 def test_cleanup_all():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/cleanup_all.py', False, CliOnFail, CheckFunc)
 
 if __name__ == '__main__':
index ebc0d9f6e9cfb089139faa9d0c85713dae413da2..60f616c2a6461c198b0873bf024bb52325125e3f 100755 (executable)
@@ -25,49 +25,48 @@ import os
 import sys
 import pytest
 
-CWD = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(CWD, '../'))
-sys.path.append(CWD)
+sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../'))
 
 from lib.ltemplate import *
 
 def test_ltemplate_start():
-    ltemplate_start(CWD)
+    cwd = os.path.dirname(os.path.realpath(__file__))
+    ltemplate_start(cwd)
 
 def test_adjacencies():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/adjacencies.py', False, CliOnFail, CheckFunc)
 
 def SKIP_test_add_routes():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/add_routes.py', False, CliOnFail, CheckFunc)
 
 def test_check_routes():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/check_routes.py', False, CliOnFail, CheckFunc)
 
 def SKIP_test_cleanup_all():
     CliOnFail = None
     # For debugging, uncomment the next line
     #CliOnFail = 'tgen.mininet_cli'
-    CheckFunc = 'versionCheck(\'3.1\')'
+    CheckFunc = 'customize.versionCheck(\'3.1\')'
     #uncomment next line to start cli *before* script is run
-    #CheckFunc = 'versionCheck(\'3.1\', cli=True)'
+    #CheckFunc = 'customize.versionCheck(\'3.1\', cli=True)'
     ltemplateTest('scripts/cleanup_all.py', False, CliOnFail, CheckFunc)
 
 if __name__ == '__main__':