Modified path append to work better with Windows, updated use of wait_for_ip calls to work with new params

This commit is contained in:
Logan Lipke
2020-07-13 12:42:50 -07:00
parent 0b0a51487d
commit 4f402d15f4
6 changed files with 21 additions and 11 deletions

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env python3
import sys
import os
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit(1)
if 'py-json' not in sys.path:
sys.path.append('../py-json')
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
import LANforge
from LANforge.lfcli_base import LFCliBase
from LANforge import LFUtils

View File

@@ -102,7 +102,9 @@ class IPV4L4(LFCliBase):
old_rx_values = self.__get_values()
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
self.station_profile.admin_up(1)
self.local_realm.wait_for_ip()
temp_stas = self.sta_list.copy()
temp_stas.append("eth1")
self.local_realm.wait_for_ip(self.resource, temp_stas)
self.cx_profile.start_cx()
passes = 0
expected_passes = 0

View File

@@ -1,13 +1,13 @@
#!/usr/bin/env python3
import sys
import os
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit(1)
if 'py-json' not in sys.path:
sys.path.append('../py-json')
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
import argparse
from LANforge.lfcli_base import LFCliBase
@@ -100,7 +100,9 @@ class IPV4L4(LFCliBase):
passes = 0
expected_passes = 0
self.station_profile.admin_up(1)
self.local_realm.wait_for_ip()
temp_stas = self.sta_list.copy()
temp_stas.append("eth1")
self.local_realm.wait_for_ip(self.resource, temp_stas)
self.cx_profile.start_cx()
for test in range(self.num_tests):
expected_passes += 1

View File

@@ -1,13 +1,14 @@
#!/usr/bin/env python3
import sys
import os
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit(1)
if 'py-json' not in sys.path:
sys.path.append('../py-json')
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
import argparse
from LANforge.lfcli_base import LFCliBase
@@ -87,7 +88,9 @@ class IPV4VariableTime(LFCliBase):
def start(self, print_pass=False, print_fail=False):
self.station_profile.admin_up(self.resource)
self.local_realm.wait_for_ip()
temp_stas = self.sta_list.copy()
temp_stas.append("eth1")
self.local_realm.wait_for_ip(self.resource, temp_stas)
cur_time = datetime.datetime.now()
old_cx_rx_values = self.__get_rx_values()
end_time = self.local_realm.parse_time(self.test_duration) + cur_time

View File

@@ -7,7 +7,7 @@ if sys.version_info[0] != 3:
exit(1)
if 'py-json' not in sys.path:
sys.path.append('../py-json')
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
import LANforge
from LANforge.lfcli_base import LFCliBase
from LANforge import LFUtils

View File

@@ -1,13 +1,14 @@
#!/usr/bin/env python3
import sys
import os
if sys.version_info[0] != 3:
print("This script requires Python 3")
exit(1)
if 'py-json' not in sys.path:
sys.path.append('../py-json')
sys.path.append(os.path.join(os.path.abspath('..'), 'py-json'))
import argparse
from LANforge.lfcli_base import LFCliBase
@@ -89,7 +90,9 @@ class IPV6VariableTime(LFCliBase):
def start(self, print_pass=False, print_fail=False):
print("Starting test")
self.station_profile.admin_up(self.resource)
self.local_realm.wait_for_ip(ipv6=True)
temp_stas = self.sta_list.copy()
temp_stas.append("eth1")
self.local_realm.wait_for_ip(self.resource, temp_stas, ipv6=True)
cur_time = datetime.datetime.now()
old_cx_rx_values = self.__get_rx_values()
end_time = self.local_realm.parse_time(self.test_duration) + cur_time