summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimarom <imarom@cisco.com>2016-03-23 10:43:40 +0200
committerimarom <imarom@cisco.com>2016-03-23 13:01:10 +0200
commit89a2be8247936e2d3d8323c0e51a86c198a879a2 (patch)
tree3433141e9eb84d35816c938308347686608ae6a3
parenta380bf1055c6cb4432b1c928f73a3ca3ada52d9d (diff)
yes...again Python3....
-rwxr-xr-xscripts/automation/regression/CProgressDisp.py16
-rwxr-xr-xscripts/automation/regression/functional_tests/pkt_bld_general_test.py2
-rwxr-xr-xscripts/automation/regression/functional_tests/platform_cmd_cache_test.py6
-rwxr-xr-xscripts/automation/regression/functional_tests/platform_dual_if_obj_test.py2
-rw-r--r--scripts/automation/regression/functional_tests/scapy_pkt_builder_test.py26
-rw-r--r--scripts/automation/regression/functional_tests/stl_basic_tests.py123
-rwxr-xr-xscripts/automation/regression/misc_methods.py37
-rwxr-xr-xscripts/automation/regression/outer_packages.py56
-rwxr-xr-xscripts/automation/regression/platform_cmd_link.py26
-rw-r--r--scripts/automation/regression/trex.py28
-rwxr-xr-xscripts/automation/regression/trex_unit_test.py15
-rwxr-xr-xscripts/automation/trex_control_plane/client/trex_client.py7
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py3
-rw-r--r--scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py4
-rwxr-xr-xscripts/external_libs/nose-1.3.4/AUTHORS27
-rwxr-xr-xscripts/external_libs/nose-1.3.4/PKG-INFO38
-rwxr-xr-xscripts/external_libs/nose-1.3.4/lgpl.txt504
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/__init__.py (renamed from scripts/external_libs/nose-1.3.4/nose/__init__.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/__main__.py (renamed from scripts/external_libs/nose-1.3.4/nose/__main__.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/case.py (renamed from scripts/external_libs/nose-1.3.4/nose/case.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/commands.py (renamed from scripts/external_libs/nose-1.3.4/nose/commands.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/config.py (renamed from scripts/external_libs/nose-1.3.4/nose/config.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/core.py (renamed from scripts/external_libs/nose-1.3.4/nose/core.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/exc.py (renamed from scripts/external_libs/nose-1.3.4/nose/exc.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/ext/__init__.py (renamed from scripts/external_libs/nose-1.3.4/nose/ext/__init__.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/ext/dtcompat.py (renamed from scripts/external_libs/nose-1.3.4/nose/ext/dtcompat.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/failure.py (renamed from scripts/external_libs/nose-1.3.4/nose/failure.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/importer.py (renamed from scripts/external_libs/nose-1.3.4/nose/importer.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/inspector.py (renamed from scripts/external_libs/nose-1.3.4/nose/inspector.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/loader.py (renamed from scripts/external_libs/nose-1.3.4/nose/loader.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/__init__.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/__init__.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/allmodules.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/allmodules.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/attrib.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/attrib.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/base.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/base.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/builtin.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/builtin.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/capture.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/capture.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/collect.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/collect.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/cover.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/cover.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/debug.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/debug.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/deprecated.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/deprecated.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/doctests.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/doctests.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/errorclass.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/errorclass.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/failuredetail.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/failuredetail.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/isolate.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/isolate.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/logcapture.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/logcapture.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/manager.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/manager.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/multiprocess.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/multiprocess.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/plugintest.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/plugintest.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/prof.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/prof.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/skip.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/skip.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/testid.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/testid.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/plugins/xunit.py (renamed from scripts/external_libs/nose-1.3.4/nose/plugins/xunit.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/proxy.py (renamed from scripts/external_libs/nose-1.3.4/nose/proxy.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/pyversion.py (renamed from scripts/external_libs/nose-1.3.4/nose/pyversion.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/result.py (renamed from scripts/external_libs/nose-1.3.4/nose/result.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/selector.py (renamed from scripts/external_libs/nose-1.3.4/nose/selector.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/sphinx/__init__.py (renamed from scripts/external_libs/nose-1.3.4/nose/sphinx/__init__.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/sphinx/pluginopts.py (renamed from scripts/external_libs/nose-1.3.4/nose/sphinx/pluginopts.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/suite.py (renamed from scripts/external_libs/nose-1.3.4/nose/suite.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/tools/__init__.py (renamed from scripts/external_libs/nose-1.3.4/nose/tools/__init__.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/tools/nontrivial.py (renamed from scripts/external_libs/nose-1.3.4/nose/tools/nontrivial.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/tools/trivial.py (renamed from scripts/external_libs/nose-1.3.4/nose/tools/trivial.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/twistedtools.py (renamed from scripts/external_libs/nose-1.3.4/nose/twistedtools.py)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/usage.txt (renamed from scripts/external_libs/nose-1.3.4/nose/usage.txt)0
-rwxr-xr-xscripts/external_libs/nose-1.3.4/python2/nose/util.py (renamed from scripts/external_libs/nose-1.3.4/nose/util.py)0
65 files changed, 187 insertions, 733 deletions
diff --git a/scripts/automation/regression/CProgressDisp.py b/scripts/automation/regression/CProgressDisp.py
index ec7920c3..b911c527 100755
--- a/scripts/automation/regression/CProgressDisp.py
+++ b/scripts/automation/regression/CProgressDisp.py
@@ -1,5 +1,5 @@
#!/router/bin/python
-
+from __future__ import print_function
import threading
import sys
import time
@@ -16,16 +16,16 @@ class ProgressThread(threading.Thread):
def run(self):
if self.notifyMessage is not None:
- print(self.notifyMessage),
+ print(self.notifyMessage, end=' ')
while not self.stoprequest.is_set():
- print "\b.",
+ print("\b.", end=' ')
sys.stdout.flush()
time.sleep(5)
def join(self, timeout=None):
if self.notifyMessage is not None:
- print termstyle.green("Done!\n"),
+ print(termstyle.green("Done!\n"), end=' ')
self.stoprequest.set()
super(ProgressThread, self).join(timeout)
@@ -44,7 +44,7 @@ class TimedProgressBar(threading.Thread):
def run (self):
# global g_stop
- print
+ print()
self.pbar.start()
try:
@@ -57,10 +57,10 @@ class TimedProgressBar(threading.Thread):
except KeyboardInterrupt:
# self.pbar.finish()
- print "\nInterrupted by user!!"
+ print("\nInterrupted by user!!")
self.join()
finally:
- print
+ print()
def join(self, isPlannedStop = True, timeout=None):
if isPlannedStop:
@@ -82,6 +82,6 @@ def timedProgressBar(time_in_secs):
time.sleep(0.5)
pbar.update(i)
pbar.finish()
- print
+ print()
diff --git a/scripts/automation/regression/functional_tests/pkt_bld_general_test.py b/scripts/automation/regression/functional_tests/pkt_bld_general_test.py
index 5f89eaff..9a1b708a 100755
--- a/scripts/automation/regression/functional_tests/pkt_bld_general_test.py
+++ b/scripts/automation/regression/functional_tests/pkt_bld_general_test.py
@@ -14,7 +14,7 @@ class CGeneralPktBld_Test(object):
@staticmethod
def print_packet(pkt_obj):
- print "\nGenerated packet:\n{}".format(repr(pkt_obj))
+ print("\nGenerated packet:\n{}".format(repr(pkt_obj)))
def setUp(self):
diff --git a/scripts/automation/regression/functional_tests/platform_cmd_cache_test.py b/scripts/automation/regression/functional_tests/platform_cmd_cache_test.py
index 24ccf7a5..077d81ce 100755
--- a/scripts/automation/regression/functional_tests/platform_cmd_cache_test.py
+++ b/scripts/automation/regression/functional_tests/platform_cmd_cache_test.py
@@ -9,7 +9,7 @@ from nose.tools import assert_not_equal
class CCommandCache_Test(functional_general_test.CGeneralFunctional_Test):
def setUp(self):
- self.cache = CCommandCache()
+ self.cache = CCommandCache()
self.cache.add('IF', "ip nbar protocol-discovery", 'GigabitEthernet0/0/1')
self.cache.add('IF', "ip nbar protocol-discovery", 'GigabitEthernet0/0/2')
self.cache.add('conf', "arp 1.1.1.1 0000.0001.0000 arpa")
@@ -30,10 +30,10 @@ class CCommandCache_Test(functional_general_test.CGeneralFunctional_Test):
def test_dump_config (self):
import sys
- from StringIO import StringIO
+ from io import BytesIO
saved_stdout = sys.stdout
try:
- out = StringIO()
+ out = BytesIO()
sys.stdout = out
self.cache.dump_config()
output = out.getvalue().strip()
diff --git a/scripts/automation/regression/functional_tests/platform_dual_if_obj_test.py b/scripts/automation/regression/functional_tests/platform_dual_if_obj_test.py
index ff54b9ee..d848b466 100755
--- a/scripts/automation/regression/functional_tests/platform_dual_if_obj_test.py
+++ b/scripts/automation/regression/functional_tests/platform_dual_if_obj_test.py
@@ -9,7 +9,7 @@ from nose.tools import assert_not_equal
class CDualIfObj_Test(functional_general_test.CGeneralFunctional_Test):
def setUp(self):
- self.if_1 = CIfObj('gig0/0/1', '1.1.1.1', '2001:DB8:0:2222:0:0:0:1', '0000.0001.0000', '0000.0001.0000', IFType.Client)
+ self.if_1 = CIfObj('gig0/0/1', '1.1.1.1', '2001:DB8:0:2222:0:0:0:1', '0000.0001.0000', '0000.0001.0000', IFType.Client)
self.if_2 = CIfObj('gig0/0/2', '1.1.2.1', '2001:DB8:1:2222:0:0:0:1', '0000.0002.0000', '0000.0002.0000', IFType.Server)
self.if_3 = CIfObj('gig0/0/3', '1.1.3.1', '2001:DB8:2:2222:0:0:0:1', '0000.0003.0000', '0000.0003.0000', IFType.Client)
self.if_4 = CIfObj('gig0/0/4', '1.1.4.1', '2001:DB8:3:2222:0:0:0:1', '0000.0004.0000', '0000.0004.0000', IFType.Server)
diff --git a/scripts/automation/regression/functional_tests/scapy_pkt_builder_test.py b/scripts/automation/regression/functional_tests/scapy_pkt_builder_test.py
index 14f0014c..a3fcd091 100644
--- a/scripts/automation/regression/functional_tests/scapy_pkt_builder_test.py
+++ b/scripts/automation/regression/functional_tests/scapy_pkt_builder_test.py
@@ -45,7 +45,7 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test):
pkt_builder.dump_scripts ()
- print pkt_builder.get_vm_data()
+ print(pkt_builder.get_vm_data())
assert_equal( pkt_builder.get_vm_data(), {'split_by_var': '', 'instructions': [{'name': 'a', 'max_value': 268435466, 'min_value': 268435457, 'init_value': 268435457, 'size': 4, 'type': 'flow_var', 'step':1,'op': 'inc'}, {'is_big_endian': True, 'pkt_offset': 26, 'type': 'write_flow_var', 'name': 'a', 'add_value': 0}, {'pkt_offset': 14, 'type': 'fix_checksum_ipv4'}]} )
@@ -178,7 +178,7 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test):
build ipv6 packet
"""
- print "start "
+ print("start ")
py='\x55'*(64)
p=Ether()/IPv6()/UDP(dport=12,sport=1025)/py
@@ -300,25 +300,25 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test):
def test_simple_pkt_loader(self):
p=RawPcapReader("functional_tests/golden/basic_imix_golden.cap")
- print ""
+ print("")
for pkt in p:
- print pkt[1]
- print hexdump(str(pkt[0]))
+ print(pkt[1])
+ print(hexdump(str(pkt[0])))
break;
def test_simple_pkt_loader1(self):
pkt_builder = STLPktBuilder(pkt = "functional_tests/golden/udp_590.cap", build_raw = False);
- print ""
+ print("")
pkt_builder.dump_as_hex()
r = pkt_builder.pkt_raw
- assert_equal(ord(r[1]),0x50)
- assert_equal(ord(r[0]),0x00)
- assert_equal(ord(r[0x240]),0x16)
- assert_equal(ord(r[0x24d]),0x79)
+ assert_equal(safe_ord(r[1]),0x50)
+ assert_equal(safe_ord(r[0]),0x00)
+ assert_equal(safe_ord(r[0x240]),0x16)
+ assert_equal(safe_ord(r[0x24d]),0x79)
assert_equal(len(r),590)
- print len(r)
+ print(len(r))
def test_simple_pkt_loader2(self):
@@ -341,8 +341,8 @@ class CTRexPktBuilderSanitySCapy_Test(pkt_bld_general_test.CGeneralPktBld_Test):
py='\x55'*(64)
p=Ether()/IP()/UDP(dport=12,sport=1025)/py
- pkt_str = str(p);
- print ""
+ pkt_str = bytes(p);
+ print("")
hexdump(pkt_str);
scapy_pkt = Ether(pkt_str);
scapy_pkt.show2();
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py
index ea515401..6467c128 100644
--- a/scripts/automation/regression/functional_tests/stl_basic_tests.py
+++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py
@@ -7,9 +7,9 @@ from nose.tools import assert_not_equal
from nose.tools import nottest
from nose.plugins.attrib import attr
from trex import CTRexScenario
-from dpkt import pcap
from trex_stl_lib import trex_stl_sim
from trex_stl_lib.trex_stl_streams import STLProfile
+from trex_stl_lib.trex_stl_packet_builder_scapy import RawPcapReader, RawPcapWriter
import sys
import os
import subprocess
@@ -36,7 +36,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
self.profiles['random_size_9k'] = os.path.join(self.profiles_path, "../udp_rand_len_9k.py")
self.profiles['imix_tuple_gen'] = os.path.join(self.profiles_path, "imix_1pkt_tuple_gen.yaml")
- for k, v in self.profiles.iteritems():
+ for k, v in self.profiles.items():
self.verify_exists(v)
self.valgrind_profiles = [ self.profiles['imix_3pkt_vm'],
@@ -65,23 +65,19 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
def compare_caps (self, cap1, cap2, max_diff_sec = 0.01):
- with open(cap1, 'r') as f1:
- reader1 = pcap.Reader(f1)
- pkts1 = reader1.readpkts()
-
- with open(cap2, 'r') as f2:
- reader2 = pcap.Reader(f2)
- pkts2 = reader2.readpkts()
+ pkts1 = list(RawPcapReader(cap1))
+ pkts2 = list(RawPcapReader(cap2))
assert_equal(len(pkts1), len(pkts2))
- for pkt1, pkt2, i in zip(pkts1, pkts2, xrange(1, len(pkts1))):
- ts1 = pkt1[0]
- ts2 = pkt2[0]
+ for pkt1, pkt2, i in zip(pkts1, pkts2, range(1, len(pkts1))):
+ ts1 = float(pkt1[1][0]) + (float(pkt1[1][1]) / 1e6)
+ ts2 = float(pkt2[1][0]) + (float(pkt2[1][1]) / 1e6)
+
if abs(ts1-ts2) > 0.000005: # 5 nsec
raise AssertionError("TS error: cap files '{0}', '{1}' differ in cap #{2} - '{3}' vs. '{4}'".format(cap1, cap2, i, ts1, ts2))
- if pkt1[1] != pkt2[1]:
+ if pkt1[0] != pkt2[0]:
raise AssertionError("RAW error: cap files '{0}', '{1}' differ in cap #{2}".format(cap1, cap2, i))
@@ -121,6 +117,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
finally:
if not do_no_remove:
os.unlink(output_cap)
+
if test_generated:
try:
generated_filename = input_file.replace('.py', '_GENERATED.py').replace('.yaml', '_GENERATED.py')
@@ -128,15 +125,18 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
profile = STLProfile.load_py(input_file)
elif input_file.endswith('.yaml'):
profile = STLProfile.load_yaml(input_file)
- profile.dump_to_code(generated_filename)
+ profile.dump_to_code(generated_filename)
+
rc = self.run_sim(generated_filename, output_cap, options, silent)
assert_equal(rc, True)
if compare:
self.compare_caps(output_cap, golden_file)
+
except Exception as e:
- print e
+ print(e)
+
finally:
if not do_no_remove_generated:
os.unlink(generated_filename)
@@ -148,52 +148,52 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
def test_stl_profiles (self):
p = [
- ["udp_1pkt_1mac_override.py","-m 1 -l 50",True],
- ["syn_attack.py","-m 1 -l 50",True], # can't compare random now
- ["udp_1pkt_1mac.py","-m 1 -l 50",True],
- ["udp_1pkt_mac.py","-m 1 -l 50",True],
- ["udp_1pkt.py","-m 1 -l 50",True],
- ["udp_1pkt_tuple_gen.py","-m 1 -l 50",True],
- ["udp_rand_len_9k.py","-m 1 -l 50",True], # can't do the compare
- ["udp_1pkt_mpls.py","-m 1 -l 50",True],
- ["udp_1pkt_mpls_vm.py","-m 1 ",True],
- ["imix.py","-m 1 -l 100",True],
- ["udp_inc_len_9k.py","-m 1 -l 100",True],
- ["udp_1pkt_range_clients.py","-m 1 -l 100",True],
- ["multi_burst_2st_1000pkt.py","-m 1 -l 100",True],
- ["pcap.py", "-m 1", True],
- ["pcap_with_vm.py", "-m 1", True],
+ ["udp_1pkt_1mac_override.py","-m 1 -l 50",True],
+ ["syn_attack.py","-m 1 -l 50",True], # can't compare random now
+ ["udp_1pkt_1mac.py","-m 1 -l 50",True],
+ ["udp_1pkt_mac.py","-m 1 -l 50",True],
+ ["udp_1pkt.py","-m 1 -l 50",True],
+ ["udp_1pkt_tuple_gen.py","-m 1 -l 50",True],
+ ["udp_rand_len_9k.py","-m 1 -l 50",True], # can't do the compare
+ ["udp_1pkt_mpls.py","-m 1 -l 50",True],
+ ["udp_1pkt_mpls_vm.py","-m 1 ",True],
+ ["imix.py","-m 1 -l 100",True],
+ ["udp_inc_len_9k.py","-m 1 -l 100",True],
+ ["udp_1pkt_range_clients.py","-m 1 -l 100",True],
+ ["multi_burst_2st_1000pkt.py","-m 1 -l 100",True],
+ ["pcap.py", "-m 1", True],
+ ["pcap_with_vm.py", "-m 1", True],
# YAML test
- ["yaml/burst_1000_pkt.yaml","-m 1 -l 100",True],
- ["yaml/burst_1pkt_1burst.yaml","-m 1 -l 100",True],
- ["yaml/burst_1pkt_vm.yaml","-m 1 -l 100",True],
- ["yaml/imix_1pkt.yaml","-m 1 -l 100",True],
- ["yaml/imix_1pkt_2.yaml","-m 1 -l 100",True],
- ["yaml/imix_1pkt_tuple_gen.yaml","-m 1 -l 100",True],
- ["yaml/imix_1pkt_vm.yaml","-m 1 -l 100",True],
- ["udp_1pkt_pcap.py","-m 1 -l 10",True],
- ["udp_3pkt_pcap.py","-m 1 -l 10",True],
- #["udp_1pkt_simple.py","-m 1 -l 3",True],
- ["udp_1pkt_pcap_relative_path.py","-m 1 -l 3",True],
- ["udp_1pkt_tuple_gen_split.py","-m 1 -c 2 -l 100",True],
- ["udp_1pkt_range_clients_split.py","-m 1 -c 2 -l 100",True],
- ["udp_1pkt_vxlan.py","-m 1 -c 1 -l 17",True, False], # can't generate: no VXLAN in Scapy, only in profile
- ["udp_1pkt_ipv6_in_ipv4.py","-m 1 -c 1 -l 17",True],
- ["yaml/imix_3pkt.yaml","-m 50kpps --limit 20 --cores 2",True],
- ["yaml/imix_3pkt_vm.yaml","-m 50kpps --limit 20 --cores 2",True],
- ["udp_1pkt_simple_mac_dst.py","-m 1 -l 1 ",True],
- ["udp_1pkt_simple_mac_src.py","-m 1 -l 1 ",True],
- ["udp_1pkt_simple_mac_dst_src.py","-m 1 -l 1 ",True],
- ["burst_3st_loop_x_times.py","-m 1 -l 20 ",True],
- ["udp_1pkt_mac_step.py","-m 1 -l 20 ",True],
- ["udp_1pkt_mac_mask1.py","-m 1 -l 20 ",True] ,
- ["udp_1pkt_mac_mask2.py","-m 1 -l 20 ",True],
- ["udp_1pkt_mac_mask3.py","-m 1 -l 20 ",True],
- ["udp_1pkt_simple_test2.py","-m 1 -l 10 ",True], # test split of packet with ip option
- ["udp_1pkt_simple_test.py","-m 1 -l 10 ",True],
- ["udp_1pkt_mac_mask5.py","-m 1 -l 30 ",True],
- ["udp_1pkt_range_clients_split_garp.py","-m 1 -l 50",True]
+ ["yaml/burst_1000_pkt.yaml","-m 1 -l 100",True],
+ ["yaml/burst_1pkt_1burst.yaml","-m 1 -l 100",True],
+ ["yaml/burst_1pkt_vm.yaml","-m 1 -l 100",True],
+ ["yaml/imix_1pkt.yaml","-m 1 -l 100",True],
+ ["yaml/imix_1pkt_2.yaml","-m 1 -l 100",True],
+ ["yaml/imix_1pkt_tuple_gen.yaml","-m 1 -l 100",True],
+ ["yaml/imix_1pkt_vm.yaml","-m 1 -l 100",True],
+ ["udp_1pkt_pcap.py","-m 1 -l 10",True],
+ ["udp_3pkt_pcap.py","-m 1 -l 10",True],
+ #["udp_1pkt_simple.py","-m 1 -l 3",True],
+ ["udp_1pkt_pcap_relative_path.py","-m 1 -l 3",True],
+ ["udp_1pkt_tuple_gen_split.py","-m 1 -c 2 -l 100",True],
+ ["udp_1pkt_range_clients_split.py","-m 1 -c 2 -l 100",True],
+ ["udp_1pkt_vxlan.py","-m 1 -c 1 -l 17",True, False], # can't generate: no VXLAN in Scapy, only in profile
+ ["udp_1pkt_ipv6_in_ipv4.py","-m 1 -c 1 -l 17",True],
+ ["yaml/imix_3pkt.yaml","-m 50kpps --limit 20 --cores 2",True],
+ ["yaml/imix_3pkt_vm.yaml","-m 50kpps --limit 20 --cores 2",True],
+ ["udp_1pkt_simple_mac_dst.py","-m 1 -l 1 ",True],
+ ["udp_1pkt_simple_mac_src.py","-m 1 -l 1 ",True],
+ ["udp_1pkt_simple_mac_dst_src.py","-m 1 -l 1 ",True],
+ ["burst_3st_loop_x_times.py","-m 1 -l 20 ",True],
+ ["udp_1pkt_mac_step.py","-m 1 -l 20 ",True],
+ ["udp_1pkt_mac_mask1.py","-m 1 -l 20 ",True] ,
+ ["udp_1pkt_mac_mask2.py","-m 1 -l 20 ",True],
+ ["udp_1pkt_mac_mask3.py","-m 1 -l 20 ",True],
+ ["udp_1pkt_simple_test2.py","-m 1 -l 10 ",True], # test split of packet with ip option
+ ["udp_1pkt_simple_test.py","-m 1 -l 10 ",True],
+ ["udp_1pkt_mac_mask5.py","-m 1 -l 30 ",True],
+ ["udp_1pkt_range_clients_split_garp.py","-m 1 -l 50",True]
];
@@ -240,11 +240,10 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test):
# valgrind tests - this runs in multi thread as it safe (no output)
def test_valgrind_various_profiles (self):
-
- print "\n"
+ print("\n")
threads = []
for profile in self.valgrind_profiles:
- print "\n*** VALGRIND: testing profile '{0}' ***\n".format(profile)
+ print("\n*** VALGRIND: testing profile '{0}' ***\n".format(profile))
obj = {'t': None, 'rc': None}
t = Thread(target = self.run_sim,
kwargs = {'obj': obj, 'yaml': profile, 'output':None, 'options': "--cores 8 --limit 20 --valgrind", 'silent': True})
diff --git a/scripts/automation/regression/misc_methods.py b/scripts/automation/regression/misc_methods.py
index 783858e8..54e3ba5d 100755
--- a/scripts/automation/regression/misc_methods.py
+++ b/scripts/automation/regression/misc_methods.py
@@ -1,9 +1,12 @@
#!/router/bin/python
+import sys
+if sys.version_info >= (3, 0):
+ import configparser
+else:
+ import ConfigParser
-import ConfigParser
import outer_packages
import yaml
-import sys
from collections import namedtuple
import subprocess, shlex
import os
@@ -13,7 +16,7 @@ TRexConfig = namedtuple('TRexConfig', 'trex, router, tftp')
# debug/development purpose, lists object's attributes and their values
def print_r(obj):
for attr in dir(obj):
- print 'obj.%s %s' % (attr, getattr(obj, attr))
+ print('obj.%s %s' % (attr, getattr(obj, attr)))
def mix_string (str):
"""Convert all string to lowercase letters, and replaces spaces with '_' char"""
@@ -22,20 +25,20 @@ def mix_string (str):
# executes given command, returns tuple (return_code, stdout, stderr)
def run_command(cmd, background = False):
if background:
- print 'Running command in background:', cmd
+ print('Running command in background:', cmd)
with open(os.devnull, 'w') as tempf:
subprocess.Popen(shlex.split(cmd), stdin=tempf, stdout=tempf, stderr=tempf)
return (None,)*3
else:
- print 'Running command:', cmd
+ print('Running command:', cmd)
proc = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdout, stderr) = proc.communicate()
if stdout:
- print 'Stdout:\n%s' % stdout
+ print('Stdout:\n%s' % stdout)
if proc.returncode:
if stderr:
- print 'Stderr:\n%s' % stderr
- print 'Return code: %s' % proc.returncode
+ print('Stderr:\n%s' % stderr)
+ print('Return code: %s' % proc.returncode)
return (proc.returncode, stdout, stderr)
@@ -81,7 +84,7 @@ def get_single_net_client_addr (ip_addr, octetListDict = {'3' : 1}, ip_type = 'i
if ip_type == 'ipv4':
ip_lst = ip_addr.split('.')
- for octet,increment in octetListDict.iteritems():
+ for octet,increment in octetListDict.items():
int_octet = int(octet)
if ((int_octet < 0) or (int_octet > 3)):
raise ValueError('the provided octet is not legal in {0} format'.format(ip_type) )
@@ -96,7 +99,7 @@ def get_single_net_client_addr (ip_addr, octetListDict = {'3' : 1}, ip_type = 'i
else: # this is a ipv6 address, handle accordingly
ip_lst = ip_addr.split(':')
- for octet,increment in octetListDict.iteritems():
+ for octet,increment in octetListDict.items():
int_octet = int(octet)
if ((int_octet < 0) or (int_octet > 7)):
raise ValueError('the provided octet is not legal in {0} format'.format(ip_type) )
@@ -159,11 +162,11 @@ def load_complete_config_file (filepath):
raise ValueError('A clean router configuration wasn`t provided.')
except ValueError:
- print '!!!!!'
+ print("")
raise
except Exception as inst:
- print "\nBad configuration file provided: '{0}'\n".format(filepath)
+ print("\nBad configuration file provided: '{0}'\n".format(filepath))
raise inst
return TRexConfig(trex_config, rtr_config, tftp_config)
@@ -174,8 +177,8 @@ def load_object_config_file (filepath):
config = yaml.load(f)
return config
except Exception as inst:
- print "\nBad configuration file provided: '{0}'\n".format(filepath)
- print inst
+ print("\nBad configuration file provided: '{0}'\n".format(filepath))
+ print(inst)
exit(-1)
@@ -202,7 +205,7 @@ def query_yes_no(question, default="yes"):
while True:
sys.stdout.write(question + prompt)
- choice = raw_input().lower()
+ choice = input().lower()
if default is not None and choice == '':
return valid[default]
elif choice in valid:
@@ -227,8 +230,8 @@ def load_benchmark_config_file (filepath):
benchmark_config = yaml.load(f)
except Exception as inst:
- print "\nBad configuration file provided: '{0}'\n".format(filepath)
- print inst
+ print("\nBad configuration file provided: '{0}'\n".format(filepath))
+ print(inst)
exit(-1)
return benchmark_config
diff --git a/scripts/automation/regression/outer_packages.py b/scripts/automation/regression/outer_packages.py
index f55c247d..bec9fe21 100755
--- a/scripts/automation/regression/outer_packages.py
+++ b/scripts/automation/regression/outer_packages.py
@@ -11,28 +11,56 @@ PATH_TO_PYTHON_LIB = os.path.abspath(os.path.join(TREX_PATH, 'external_libs'))
PATH_TO_CTRL_PLANE = os.path.abspath(os.path.join(TREX_PATH, 'automation', 'trex_control_plane'))
PATH_STL_API = os.path.abspath(os.path.join(PATH_TO_CTRL_PLANE, 'stl'))
-NIGHTLY_MODULES = ['ansi2html',
- 'enum34-1.0.4',
- 'nose-1.3.4',
- 'rednose-0.4.1',
- 'progressbar-2.2',
- 'termstyle',
- 'dpkt-1.8.6',
- 'yaml-3.11',
+
+NIGHTLY_MODULES = [ {'name': 'ansi2html'},
+ {'name': 'enum34-1.0.4'},
+ {'name': 'rednose-0.4.1'},
+ {'name': 'progressbar-2.2'},
+ {'name': 'termstyle'},
+ {'name': 'pyyaml-3.11', 'py-dep': True},
+ {'name': 'nose-1.3.4', 'py-dep': True}
]
+
+def generate_module_path (module, is_python3, is_64bit, is_cel):
+ platform_path = [module['name']]
+
+ if module.get('py-dep'):
+ platform_path.append('python3' if is_python3 else 'python2')
+
+ if module.get('arch-dep'):
+ platform_path.append('cel59' if is_cel else 'fedora18')
+ platform_path.append('64bit' if is_64bit else '32bit')
+
+ return os.path.normcase(os.path.join(PATH_TO_PYTHON_LIB, *platform_path))
+
+
+def import_module_list(modules_list):
+
+ # platform data
+ is_64bit = platform.architecture()[0] == '64bit'
+ is_python3 = (sys.version_info >= (3, 0))
+ is_cel = os.path.exists('/etc/system-profile')
+
+ # regular modules
+ for p in modules_list:
+ full_path = generate_module_path(p, is_python3, is_64bit, is_cel)
+
+ if not os.path.exists(full_path):
+ print("Unable to find required module library: '{0}'".format(p['name']))
+ print("Please provide the correct path using PATH_TO_PYTHON_LIB variable")
+ print("current path used: '{0}'".format(full_path))
+ exit(0)
+
+ sys.path.insert(1, full_path)
+
+
def import_nightly_modules ():
sys.path.append(TREX_PATH)
sys.path.append(PATH_TO_CTRL_PLANE)
sys.path.append(PATH_STL_API)
import_module_list(NIGHTLY_MODULES)
-def import_module_list (modules_list):
- assert(isinstance(modules_list, list))
- for p in modules_list:
- full_path = os.path.join(PATH_TO_PYTHON_LIB, p)
- fix_path = os.path.normcase(full_path) #CURRENT_PATH+p)
- sys.path.insert(1, full_path)
import_nightly_modules()
diff --git a/scripts/automation/regression/platform_cmd_link.py b/scripts/automation/regression/platform_cmd_link.py
index 3d577baf..eba20bfd 100755
--- a/scripts/automation/regression/platform_cmd_link.py
+++ b/scripts/automation/regression/platform_cmd_link.py
@@ -36,31 +36,31 @@ class CCommandCache(object):
def dump_config (self):
# dump IF config:
- print "configure terminal"
- for intf, intf_cmd_list in self.cache['IF'].iteritems():
- print "interface {if_name}".format( if_name = intf )
- print '\n'.join(intf_cmd_list)
+ print("configure terminal")
+ for intf, intf_cmd_list in self.cache['IF'].items():
+ print("interface {if_name}".format( if_name = intf ))
+ print('\n'.join(intf_cmd_list))
if self.cache['IF']:
# add 'exit' note only if if config actually took place
- print 'exit' # exit to global config mode
+ print('exit') # exit to global config mode
# dump global config
if self.cache['CONF']:
- print '\n'.join(self.cache['CONF'])
+ print('\n'.join(self.cache['CONF']))
# exit back to en mode
- print "exit"
+ print("exit")
# dump exec config
if self.cache['EXEC']:
- print '\n'.join(self.cache['EXEC'])
+ print('\n'.join(self.cache['EXEC']))
def get_config_list (self):
conf_list = []
conf_list.append("configure terminal")
- for intf, intf_cmd_list in self.cache['IF'].iteritems():
+ for intf, intf_cmd_list in self.cache['IF'].items():
conf_list.append( "interface {if_name}".format( if_name = intf ) )
conf_list.extend( intf_cmd_list )
if len(conf_list)>1:
@@ -94,7 +94,7 @@ class CCommandLink(object):
def __transmit (self, cmd_list, **kwargs):
self.history.extend(cmd_list)
if not self.silent_mode:
- print '\n'.join(cmd_list) # prompting the pushed platform commands
+ print('\n'.join(cmd_list)) # prompting the pushed platform commands
if not self.virtual_mode:
# transmit the command to platform.
return self.telnet_con.write_ios_cmd(cmd_list, **kwargs)
@@ -181,7 +181,7 @@ class CDeviceCfg(object):
def dump_config (self):
import yaml
- print yaml.dump(self.interfaces_cfg, default_flow_style=False)
+ print(yaml.dump(self.interfaces_cfg, default_flow_style=False))
class CIfObj(object):
_obj_id = 0
@@ -339,7 +339,7 @@ class CIfManager(object):
def get_if_list (self, if_type = IFType.All, is_duplicated = None):
result = []
- for if_name,if_obj in self.interfarces.iteritems():
+ for if_name,if_obj in self.interfarces.items():
if (if_type == IFType.All) or ( if_obj.get_if_type() == if_type) :
if (is_duplicated is None) or (if_obj.get_pair_parent().is_duplicated() == is_duplicated):
# append this if_obj only if matches both IFType and is_duplicated conditions
@@ -362,7 +362,7 @@ class CIfManager(object):
def dump_if_config (self):
if self.full_device_cfg is None:
- print "Device configuration isn't loaded.\nPlease load config and try again."
+ print("Device configuration isn't loaded.\nPlease load config and try again.")
else:
self.full_device_cfg.dump_config()
diff --git a/scripts/automation/regression/trex.py b/scripts/automation/regression/trex.py
index 8efa41f6..9459e7c6 100644
--- a/scripts/automation/regression/trex.py
+++ b/scripts/automation/regression/trex.py
@@ -96,7 +96,7 @@ class CTRexRunner:
self.yaml)
# self.trex_config['trex_latency'])
- for key, value in kwargs.iteritems():
+ for key, value in kwargs.items():
tmp_key = key.replace('_','-')
dash = ' -' if (len(key)==1) else ' --'
if value == True:
@@ -104,7 +104,7 @@ class CTRexRunner:
else:
trex_cmd += (dash + '{k} {val}'.format( k = tmp_key, val = value ))
- print "\nT-REX COMMAND: ", trex_cmd
+ print("\nT-REX COMMAND: ", trex_cmd)
cmd = 'sshpass.exp %s %s root "cd %s; %s > %s"' % (self.trex_config['trex_password'],
self.trex_config['trex_name'],
@@ -172,7 +172,7 @@ class CTRexRunner:
fin = datetime.datetime.now()
# print "Time difference : ", fin-start
runtime_deviation = abs(( (end_time - start_time)/ (duration+15) ) - 1)
- print "runtime_deviation: %2.0f %%" % ( runtime_deviation*100.0)
+ print("runtime_deviation: %2.0f %%" % ( runtime_deviation*100.0))
if ( runtime_deviation > 0.6 ) :
# If the run stopped immediately - classify as Trex in use or reachability issue
interrupted = True
@@ -183,7 +183,7 @@ class CTRexRunner:
# results = subprocess.Popen(cmd, stdout = open(os.devnull, 'wb'),
# shell=True, preexec_fn=os.setsid)
except KeyboardInterrupt:
- print "\nT-Rex test interrupted by user during traffic generation!!"
+ print("\nT-Rex test interrupted by user during traffic generation!!")
results.killpg(results.pid, signal.SIGTERM) # Send the kill signal to all the process groups
interrupted = True
raise RuntimeError
@@ -245,7 +245,7 @@ class CTRexResult():
Prints nicely the content of self.result dictionary into the screen
"""
for key, value in self.result.items():
- print "{0:20} : \t{1}".format(key, float(value))
+ print("{0:20} : \t{1}".format(key, float(value)))
def update (self, key, val, _str):
""" update (self, key, val, _str) -> None
@@ -273,7 +273,7 @@ class CTRexResult():
elif s[0]=="K":
val = val*1E3
- if self.result.has_key(key):
+ if key in self.result:
if self.result[key] > 0:
if (val/self.result[key] > 0.97 ):
self.result[key]= val
@@ -331,7 +331,7 @@ class CTRexResult():
if match:
key = misc_methods.mix_string(match.group(1))
val = float(match.group(4))
- if d.has_key(key):
+ if key in d:
if stop_read == False:
self.update (key, val, match.group(5))
else:
@@ -345,7 +345,7 @@ class CTRexResult():
if match:
key = misc_methods.mix_string(match.group(1))
val = float(match.group(4))
- if d.has_key(key):
+ if key in d:
if stop_read == False:
self.update (key, val, match.group(5))
else:
@@ -370,7 +370,7 @@ class CTRexResult():
if match:
key = misc_methods.mix_string(match.group(1))
val = float(match.group(3))
- if self.result.has_key(key):
+ if key in self.result:
if (self.result[key] < val): # update only if larger than previous value
self.result[key] = val
else:
@@ -391,7 +391,7 @@ class CTRexResult():
def get_status (self, drop_expected = False):
if (self.error != ""):
- print self.error
+ print(self.error)
return (self.STATUS_ERR_FATAL)
d = self.result
@@ -417,9 +417,9 @@ class CTRexResult():
# expected measurement
expect_vs_measued=d['total-tx']/d['expected-bps']
if ( (expect_vs_measued >1.1) or (expect_vs_measued < 0.9) ) :
- print expect_vs_measued
- print d['total-tx']
- print d['expected-bps']
+ print(expect_vs_measued)
+ print(d['total-tx'])
+ print(d['expected-bps'])
self.reason="measure is not as expected"
return self.STATUS_ERR_BAD_EXPECTED_MEASUREMENT
@@ -442,7 +442,7 @@ def test_TRex_result_parser():
t=CTRexResult('trex.txt');
t.load_file_lines()
t.parse()
- print t.result
+ print(t.result)
diff --git a/scripts/automation/regression/trex_unit_test.py b/scripts/automation/regression/trex_unit_test.py
index c8565c19..4348d004 100755
--- a/scripts/automation/regression/trex_unit_test.py
+++ b/scripts/automation/regression/trex_unit_test.py
@@ -27,6 +27,7 @@ Description:
import os
import sys
import outer_packages
+
import nose
from nose.plugins import Plugin
import logging
@@ -87,7 +88,7 @@ def kill_trex_process(trex_data):
try:
proc_name, pid, full_cmd = re.split('\s+', process, maxsplit=2)
if proc_name.find('t-rex-64') >= 0:
- print 'Killing remote process: %s' % full_cmd
+ print('Killing remote process: %s' % full_cmd)
trex_remote_command(trex_data, 'kill %s' % pid, from_scripts = False)
except:
continue
@@ -184,7 +185,7 @@ class CTRexTestConfiguringPlugin(Plugin):
rsync_command = rsync_template % (new_path, self.pkg, os.path.basename(self.pkg), new_path, new_path, new_path)
return_code, stdout, stderr = trex_remote_command(self.configuration.trex, rsync_command, from_scripts = False)
if return_code:
- print 'Failed copying'
+ print('Failed copying')
sys.exit(-1)
CTRexScenario.scripts_path = new_path
CTRexScenario.is_copied = True
@@ -198,7 +199,7 @@ class CTRexTestConfiguringPlugin(Plugin):
kill_trex_process(self.configuration.trex)
time.sleep(1)
elif check_trex_running(self.configuration.trex):
- print 'TRex is already running'
+ print('TRex is already running')
sys.exit(-1)
@@ -250,7 +251,7 @@ def save_setup_info():
with open('%s/report_%s.info' % (CTRexScenario.report_dir, CTRexScenario.setup_name), 'w') as f:
f.write(setup_info)
except Exception as err:
- print 'Error saving setup info: %s ' % err
+ print('Error saving setup info: %s ' % err)
def set_report_dir (report_dir):
@@ -334,12 +335,12 @@ if __name__ == "__main__":
result = nose.run(argv = nose_argv + additional_args, addplugins = [red_nose, config_plugin]) and result
except Exception as e:
result = False
- print e
+ print(e)
finally:
save_setup_info()
if (result == True and not CTRexScenario.is_test_list):
- print termstyle.green("""
+ print(termstyle.green("""
..::''''::..
.;'' ``;.
:: :: :: ::
@@ -356,7 +357,7 @@ if __name__ == "__main__":
/ ___/ __ |_\ \_\ \/_/
/_/ /_/ |_/___/___(_)
- """)
+ """))
sys.exit(0)
sys.exit(-1)
diff --git a/scripts/automation/trex_control_plane/client/trex_client.py b/scripts/automation/trex_control_plane/client/trex_client.py
index 9e3944d4..68c70119 100755
--- a/scripts/automation/trex_control_plane/client/trex_client.py
+++ b/scripts/automation/trex_control_plane/client/trex_client.py
@@ -3,12 +3,7 @@
import sys
import os
-try:
- # support import for Python 2
- import outer_packages
-except ImportError:
- # support import for Python 3
- import client.outer_packages
+import client.outer_packages
import jsonrpclib
from jsonrpclib import ProtocolError, AppError
from common.trex_status_e import TRexStatus
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py
index fe4bad62..c614c4bd 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_ext.py
@@ -42,10 +42,7 @@ def import_module_list(modules_list):
is_64bit = platform.architecture()[0] == '64bit'
is_python3 = (sys.version_info >= (3, 0))
is_cel = os.path.exists('/etc/system-profile')
-
-
-
# regular modules
for p in modules_list:
full_path = generate_module_path(p, is_python3, is_64bit, is_cel)
diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
index 16ffad43..eed20485 100644
--- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
+++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py
@@ -530,9 +530,9 @@ class STLStream(object):
good_printable.remove("'")
if type(data) is str:
- new_data = ''.join([c if c in good_printable else r'\x{0:02x}'.format(ord(c)) for c in x])
+ new_data = ''.join([c if c in good_printable else r'\x{0:02x}'.format(ord(c)) for c in data])
else:
- new_data = ''.join([chr(c) if chr(c) in good_printable else r'\x{0:02x}'.format(c) for c in x])
+ new_data = ''.join([chr(c) if chr(c) in good_printable else r'\x{0:02x}'.format(c) for c in data])
payload_start = packet_command.find("Raw(load='")
if payload_start != -1:
diff --git a/scripts/external_libs/nose-1.3.4/AUTHORS b/scripts/external_libs/nose-1.3.4/AUTHORS
deleted file mode 100755
index 5414bcda..00000000
--- a/scripts/external_libs/nose-1.3.4/AUTHORS
+++ /dev/null
@@ -1,27 +0,0 @@
-Jason Pellerin
-Kumar McMillan
-Mika Eloranta
-Jay Parlar
-Scot Doyle
-James Casbon
-Antoine Pitrou
-John J Lee
-Allen Bierbaum
-Pam Zerbinos
-Augie Fackler
-Peter Fein
-Kevin Mitchell
-Alex Stewart
-Timothee Peignier
-Thomas Kluyver
-Heng Liu
-Rosen Diankov
-Buck Golemon
-Bobby Impollonia
-Takafumi Arakaki
-Peter Bengtsson
-Gary Donovan
-Brendan McCollam
-Erik Rose
-Sascha Peilicke
-Andre Caron
diff --git a/scripts/external_libs/nose-1.3.4/PKG-INFO b/scripts/external_libs/nose-1.3.4/PKG-INFO
deleted file mode 100755
index dea3d585..00000000
--- a/scripts/external_libs/nose-1.3.4/PKG-INFO
+++ /dev/null
@@ -1,38 +0,0 @@
-Metadata-Version: 1.1
-Name: nose
-Version: 1.3.4
-Summary: nose extends unittest to make testing easier
-Home-page: http://readthedocs.org/docs/nose/
-Author: Jason Pellerin
-Author-email: jpellerin+nose@gmail.com
-License: GNU LGPL
-Description: nose extends the test loading and running features of unittest, making
- it easier to write, find and run tests.
-
- By default, nose will run tests in files or directories under the current
- working directory whose names include "test" or "Test" at a word boundary
- (like "test_this" or "functional_test" or "TestClass" but not
- "libtest"). Test output is similar to that of unittest, but also includes
- captured stdout output from failing tests, for easy print-style debugging.
-
- These features, and many more, are customizable through the use of
- plugins. Plugins included with nose provide support for doctest, code
- coverage and profiling, flexible attribute-based test selection,
- output capture and more. More information about writing plugins may be
- found on in the nose API documentation, here:
- http://readthedocs.org/docs/nose/
-
- If you have recently reported a bug marked as fixed, or have a craving for
- the very latest, you may want the development version instead:
- https://github.com/nose-devs/nose/tarball/master#egg=nose-dev
-
-Keywords: test unittest doctest automatic discovery
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
-Classifier: Natural Language :: English
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 3
-Classifier: Topic :: Software Development :: Testing
diff --git a/scripts/external_libs/nose-1.3.4/lgpl.txt b/scripts/external_libs/nose-1.3.4/lgpl.txt
deleted file mode 100755
index 8add30ad..00000000
--- a/scripts/external_libs/nose-1.3.4/lgpl.txt
+++ /dev/null
@@ -1,504 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/scripts/external_libs/nose-1.3.4/nose/__init__.py b/scripts/external_libs/nose-1.3.4/python2/nose/__init__.py
index 8ab010bf..8ab010bf 100755
--- a/scripts/external_libs/nose-1.3.4/nose/__init__.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/__init__.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/__main__.py b/scripts/external_libs/nose-1.3.4/python2/nose/__main__.py
index b402d9df..b402d9df 100755
--- a/scripts/external_libs/nose-1.3.4/nose/__main__.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/__main__.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/case.py b/scripts/external_libs/nose-1.3.4/python2/nose/case.py
index cffa4ab4..cffa4ab4 100755
--- a/scripts/external_libs/nose-1.3.4/nose/case.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/case.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/commands.py b/scripts/external_libs/nose-1.3.4/python2/nose/commands.py
index ef0e9cae..ef0e9cae 100755
--- a/scripts/external_libs/nose-1.3.4/nose/commands.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/commands.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/config.py b/scripts/external_libs/nose-1.3.4/python2/nose/config.py
index 4214c2d6..4214c2d6 100755
--- a/scripts/external_libs/nose-1.3.4/nose/config.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/config.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/core.py b/scripts/external_libs/nose-1.3.4/python2/nose/core.py
index 49e7939b..49e7939b 100755
--- a/scripts/external_libs/nose-1.3.4/nose/core.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/core.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/exc.py b/scripts/external_libs/nose-1.3.4/python2/nose/exc.py
index 8b780db0..8b780db0 100755
--- a/scripts/external_libs/nose-1.3.4/nose/exc.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/exc.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/ext/__init__.py b/scripts/external_libs/nose-1.3.4/python2/nose/ext/__init__.py
index 5fd1516a..5fd1516a 100755
--- a/scripts/external_libs/nose-1.3.4/nose/ext/__init__.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/ext/__init__.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/ext/dtcompat.py b/scripts/external_libs/nose-1.3.4/python2/nose/ext/dtcompat.py
index 332cf08c..332cf08c 100755
--- a/scripts/external_libs/nose-1.3.4/nose/ext/dtcompat.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/ext/dtcompat.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/failure.py b/scripts/external_libs/nose-1.3.4/python2/nose/failure.py
index c5fabfda..c5fabfda 100755
--- a/scripts/external_libs/nose-1.3.4/nose/failure.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/failure.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/importer.py b/scripts/external_libs/nose-1.3.4/python2/nose/importer.py
index e677658c..e677658c 100755
--- a/scripts/external_libs/nose-1.3.4/nose/importer.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/importer.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/inspector.py b/scripts/external_libs/nose-1.3.4/python2/nose/inspector.py
index a6c4a3e3..a6c4a3e3 100755
--- a/scripts/external_libs/nose-1.3.4/nose/inspector.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/inspector.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/loader.py b/scripts/external_libs/nose-1.3.4/python2/nose/loader.py
index 966b6dc7..966b6dc7 100755
--- a/scripts/external_libs/nose-1.3.4/nose/loader.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/loader.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/__init__.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/__init__.py
index 08ee8f32..08ee8f32 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/__init__.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/__init__.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/allmodules.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/allmodules.py
index 1ccd7773..1ccd7773 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/allmodules.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/allmodules.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/attrib.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/attrib.py
index 3d4422a2..3d4422a2 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/attrib.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/attrib.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/base.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/base.py
index f09beb69..f09beb69 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/base.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/base.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/builtin.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/builtin.py
index 4fcc0018..4fcc0018 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/builtin.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/builtin.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/capture.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/capture.py
index fa4e5dca..fa4e5dca 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/capture.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/capture.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/collect.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/collect.py
index 6f9f0faa..6f9f0faa 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/collect.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/collect.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/cover.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/cover.py
index 551f3320..551f3320 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/cover.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/cover.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/debug.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/debug.py
index 78243e60..78243e60 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/debug.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/debug.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/deprecated.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/deprecated.py
index 461a26be..461a26be 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/deprecated.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/deprecated.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/doctests.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/doctests.py
index 5ef65799..5ef65799 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/doctests.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/doctests.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/errorclass.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/errorclass.py
index d1540e00..d1540e00 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/errorclass.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/errorclass.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/failuredetail.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/failuredetail.py
index 6462865d..6462865d 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/failuredetail.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/failuredetail.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/isolate.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/isolate.py
index 13235dfb..13235dfb 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/isolate.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/isolate.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/logcapture.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/logcapture.py
index 4c9a79f6..4c9a79f6 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/logcapture.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/logcapture.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/manager.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/manager.py
index 4d2ed22b..4d2ed22b 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/manager.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/manager.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/multiprocess.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/multiprocess.py
index 2cae744a..2cae744a 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/multiprocess.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/multiprocess.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/plugintest.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/plugintest.py
index 76d0d2c4..76d0d2c4 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/plugintest.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/plugintest.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/prof.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/prof.py
index 4d304a93..4d304a93 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/prof.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/prof.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/skip.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/skip.py
index 9d1ac8f6..9d1ac8f6 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/skip.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/skip.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/testid.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/testid.py
index 49fff9b1..49fff9b1 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/testid.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/testid.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/plugins/xunit.py b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/xunit.py
index e1ec0e1d..e1ec0e1d 100755
--- a/scripts/external_libs/nose-1.3.4/nose/plugins/xunit.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/plugins/xunit.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/proxy.py b/scripts/external_libs/nose-1.3.4/python2/nose/proxy.py
index c2676cb1..c2676cb1 100755
--- a/scripts/external_libs/nose-1.3.4/nose/proxy.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/proxy.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/pyversion.py b/scripts/external_libs/nose-1.3.4/python2/nose/pyversion.py
index 8b566141..8b566141 100755
--- a/scripts/external_libs/nose-1.3.4/nose/pyversion.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/pyversion.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/result.py b/scripts/external_libs/nose-1.3.4/python2/nose/result.py
index f974a14a..f974a14a 100755
--- a/scripts/external_libs/nose-1.3.4/nose/result.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/result.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/selector.py b/scripts/external_libs/nose-1.3.4/python2/nose/selector.py
index c4a006a8..c4a006a8 100755
--- a/scripts/external_libs/nose-1.3.4/nose/selector.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/selector.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/sphinx/__init__.py b/scripts/external_libs/nose-1.3.4/python2/nose/sphinx/__init__.py
index 2ae28399..2ae28399 100755
--- a/scripts/external_libs/nose-1.3.4/nose/sphinx/__init__.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/sphinx/__init__.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/sphinx/pluginopts.py b/scripts/external_libs/nose-1.3.4/python2/nose/sphinx/pluginopts.py
index d2b284ab..d2b284ab 100755
--- a/scripts/external_libs/nose-1.3.4/nose/sphinx/pluginopts.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/sphinx/pluginopts.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/suite.py b/scripts/external_libs/nose-1.3.4/python2/nose/suite.py
index a831105e..a831105e 100755
--- a/scripts/external_libs/nose-1.3.4/nose/suite.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/suite.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/tools/__init__.py b/scripts/external_libs/nose-1.3.4/python2/nose/tools/__init__.py
index 74dab16a..74dab16a 100755
--- a/scripts/external_libs/nose-1.3.4/nose/tools/__init__.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/tools/__init__.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/tools/nontrivial.py b/scripts/external_libs/nose-1.3.4/python2/nose/tools/nontrivial.py
index 28397324..28397324 100755
--- a/scripts/external_libs/nose-1.3.4/nose/tools/nontrivial.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/tools/nontrivial.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/tools/trivial.py b/scripts/external_libs/nose-1.3.4/python2/nose/tools/trivial.py
index cf83efed..cf83efed 100755
--- a/scripts/external_libs/nose-1.3.4/nose/tools/trivial.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/tools/trivial.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/twistedtools.py b/scripts/external_libs/nose-1.3.4/python2/nose/twistedtools.py
index 8d9c6ffe..8d9c6ffe 100755
--- a/scripts/external_libs/nose-1.3.4/nose/twistedtools.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/twistedtools.py
diff --git a/scripts/external_libs/nose-1.3.4/nose/usage.txt b/scripts/external_libs/nose-1.3.4/python2/nose/usage.txt
index bc96894a..bc96894a 100755
--- a/scripts/external_libs/nose-1.3.4/nose/usage.txt
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/usage.txt
diff --git a/scripts/external_libs/nose-1.3.4/nose/util.py b/scripts/external_libs/nose-1.3.4/python2/nose/util.py
index e6f735e0..e6f735e0 100755
--- a/scripts/external_libs/nose-1.3.4/nose/util.py
+++ b/scripts/external_libs/nose-1.3.4/python2/nose/util.py