mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
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:
@@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if 'py-json' not in sys.path:
|
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
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ class IPV4L4(LFCliBase):
|
|||||||
old_rx_values = self.__get_values()
|
old_rx_values = self.__get_values()
|
||||||
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
|
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
|
||||||
self.station_profile.admin_up(1)
|
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()
|
self.cx_profile.start_cx()
|
||||||
passes = 0
|
passes = 0
|
||||||
expected_passes = 0
|
expected_passes = 0
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if 'py-json' not in sys.path:
|
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
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
@@ -100,7 +100,9 @@ class IPV4L4(LFCliBase):
|
|||||||
passes = 0
|
passes = 0
|
||||||
expected_passes = 0
|
expected_passes = 0
|
||||||
self.station_profile.admin_up(1)
|
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()
|
self.cx_profile.start_cx()
|
||||||
for test in range(self.num_tests):
|
for test in range(self.num_tests):
|
||||||
expected_passes += 1
|
expected_passes += 1
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if 'py-json' not in sys.path:
|
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
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
@@ -87,7 +88,9 @@ class IPV4VariableTime(LFCliBase):
|
|||||||
|
|
||||||
def start(self, print_pass=False, print_fail=False):
|
def start(self, print_pass=False, print_fail=False):
|
||||||
self.station_profile.admin_up(self.resource)
|
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()
|
cur_time = datetime.datetime.now()
|
||||||
old_cx_rx_values = self.__get_rx_values()
|
old_cx_rx_values = self.__get_rx_values()
|
||||||
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
|
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ if sys.version_info[0] != 3:
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if 'py-json' not in sys.path:
|
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
|
import LANforge
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
from LANforge import LFUtils
|
from LANforge import LFUtils
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python 3")
|
print("This script requires Python 3")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if 'py-json' not in sys.path:
|
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
|
import argparse
|
||||||
from LANforge.lfcli_base import LFCliBase
|
from LANforge.lfcli_base import LFCliBase
|
||||||
@@ -89,7 +90,9 @@ class IPV6VariableTime(LFCliBase):
|
|||||||
def start(self, print_pass=False, print_fail=False):
|
def start(self, print_pass=False, print_fail=False):
|
||||||
print("Starting test")
|
print("Starting test")
|
||||||
self.station_profile.admin_up(self.resource)
|
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()
|
cur_time = datetime.datetime.now()
|
||||||
old_cx_rx_values = self.__get_rx_values()
|
old_cx_rx_values = self.__get_rx_values()
|
||||||
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
|
end_time = self.local_realm.parse_time(self.test_duration) + cur_time
|
||||||
|
|||||||
Reference in New Issue
Block a user