diff options
author | Hanoh Haim <hhaim@cisco.com> | 2016-09-13 15:26:27 +0300 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2016-09-13 19:37:29 +0300 |
commit | 9df89870d053a01a8b65afc1484db6185309ddd8 (patch) | |
tree | d4508df995d3a1499664fc78795b0b1130b7fb2d /scripts/automation | |
parent | b424cd3de89ce5dbf67b349d3fe9ffe15b521452 (diff) |
fix random_limit max value
Diffstat (limited to 'scripts/automation')
-rw-r--r-- | scripts/automation/regression/functional_tests/stl_basic_tests.py | 5 | ||||
-rwxr-xr-x | scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py index 5af1e4de..df377037 100644 --- a/scripts/automation/regression/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py @@ -273,12 +273,9 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): ["udp_1pkt_range_clients_split_garp.py","-m 1 -l 50",True], ["udp_1pkt_src_ip_split.py","-m 1 -l 50 --cores 2",True], ["udp_1pkt_repeat_random.py","-m 1 -l 50",True], - - ]; - - p = [ ["udp_1pkt_repeat_random.py","-m 1 -l 50",True] ] + p = [ ["udp_1pkt_repeat_random.py","-m 1 -l 50",True] ]; for obj in p: diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py index 5f3a0078..079a8d3c 100755 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_packet_builder_scapy.py @@ -751,9 +751,9 @@ class STLVmFlowVarRepetableRandom(CTRexVmDescBase): self.min_value = convert_val (min_value); if max_value == None : - max_value = get_max_by_size() - - self.max_value = get_max_by_size (self.size) + self.max_value = get_max_by_size (self.size) + else: + self.max_value = convert_val (max_value) if self.min_value > self.max_value : raise CTRexPacketBuildException(-11,("max %d is lower than min %d ") % (self.max_value,self.min_value) ); |