diff options
author | 2016-02-24 16:08:33 +0200 | |
---|---|---|
committer | 2016-02-24 16:08:33 +0200 | |
commit | 4ae35508f6b448162aa4707264895b4dc42dd0de (patch) | |
tree | 671c99ed4607e5e23954239d52f6fbd289e94266 /scripts/automation | |
parent | 5a844c9d72411435842e5a0674c6fdc04e5d4e84 (diff) |
add seed per stream
Diffstat (limited to 'scripts/automation')
-rw-r--r-- | scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py | 6 | ||||
-rw-r--r-- | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py index eb8bf1a6..22a63ddd 100644 --- a/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/unit_tests/functional_tests/stl_basic_tests.py @@ -141,12 +141,12 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): p = [ ["udp_1pkt_1mac_override.py","-m 1 -l 50",True], - ["syn_attack.py","-m 1 -l 50",False], # can't compare random now + ["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",False], # can't do the compare + ["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], @@ -190,7 +190,7 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): ]; - p1 = [ ["udp_1pkt_range_clients_split_garp.py","-m 1 -l 10 ",True] ] + p1 = [ ["udp_rand_len_9k.py","-m 1 -l 50",True] ] for obj in p: 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 127d1669..fdd330a5 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 @@ -152,6 +152,7 @@ class STLStream(object): next = None, stream_id = None, action_count = 0, + random_seed =0, mac_src_override_by_pkt=None, mac_dst_override_mode=None #see STLStreamDstMAC_xx ): @@ -163,6 +164,7 @@ class STLStream(object): validate_type('self_start', self_start, bool) validate_type('isg', isg, (int, float)) validate_type('stream_id', stream_id, (NoneType, int)) + validate_type('random_seed',random_seed,int); if (type(mode) == STLTXCont) and (next != None): raise STLError("continuous stream cannot have a next stream ID") @@ -207,6 +209,9 @@ class STLStream(object): self.fields['self_start'] = self_start self.fields['isg'] = isg + if random_seed !=0 : + self.fields['random_seed'] = random_seed # optional + # mode self.fields['mode'] = mode.to_json() self.mode_desc = str(mode) |