From f47a3ae41ef692bdf15f3f3ba7fcd1c2cf8098c1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe NOEL Date: Fri, 28 Sep 2012 10:20:46 +0200 Subject: validation: simplify the code of iperf, closes #3363 --- validation/test/P2P_throughput/P2P_throughput.py | 18 ++++++++++-------- validation/test/P2P_throughput/config.py | 9 ++++----- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'validation/test/P2P_throughput') diff --git a/validation/test/P2P_throughput/P2P_throughput.py b/validation/test/P2P_throughput/P2P_throughput.py index 8c860b2f8e..e13714f877 100644 --- a/validation/test/P2P_throughput/P2P_throughput.py +++ b/validation/test/P2P_throughput/P2P_throughput.py @@ -176,9 +176,11 @@ def check_config_aux(attenuation_offset, attenuation_range_db, #We check that the attenuation is in the attenuation range #of the attenuator assert attenuation_db <= max_attenuation_db, \ - ("Attenuation too high", test_value) + ("Attenuation too high", test_value, attenuation_offset, \ + max_attenuation_db) assert attenuation_db >= min_attenuation_db, \ - ("Attenuation too low", test_value) + ("Attenuation too low", test_value, attenuation_offset, \ + min_attenuation_db) if test_type == "SNR": #We check here that the values of SNR are consistent with the #output power range of the waveform generator @@ -186,9 +188,9 @@ def check_config_aux(attenuation_offset, attenuation_range_db, for test_value in test_values: power_dbm = snr_offset_db - test_value assert power_dbm <= max_power_dbm, \ - ("SNR too low", test_value) + ("SNR too low", snr_offset_db, test_value, max_power_dbm) assert power_dbm >= min_power_dbm, \ - ("SNR too high", test_value) + ("SNR too high", snr_offset_db, test_value, min_power_dbm) assert test_params == None elif test_type == "SJR": #Because of sjr_attenuator_attenuation_db, the bench is not @@ -207,9 +209,9 @@ def check_config_aux(attenuation_offset, attenuation_range_db, power_dbm = sjr_offset_db - test_value (min_power_dbm, max_power_dbm) = power_range_dbm assert power_dbm <= max_power_dbm, \ - ("SJR too low", test_value) + ("SJR too low", sjr_offset_db, test_value, max_power_dbm) assert power_dbm >= min_power_dbm, \ - ("SJR too high", test_value) + ("SJR too high", sjr_offset_db, test_value, min_power_dbm) elif test_type == "dynamic_jammer": assert test_values == ["time"] (min_attenuation_db, max_attenuation_db) = attenuation_range_db @@ -224,9 +226,9 @@ def check_config_aux(attenuation_offset, attenuation_range_db, #output power range of the waveform generator (min_power_dbm, max_power_dbm) = power_range_dbm assert power_dbm <= max_power_dbm, \ - ("SJR too low", test_value) + ("SJR too low", sjr_offset_db, test_params[0], max_power_dbm) assert power_dbm >= min_power_dbm, \ - ("SJR too high", test_value) + ("SJR too high", sjr_offset_db, test_params[0], min_power_dbm) else: assert test_params == None, test_params diff --git a/validation/test/P2P_throughput/config.py b/validation/test/P2P_throughput/config.py index fbe65c7757..5a945ed56b 100644 --- a/validation/test/P2P_throughput/config.py +++ b/validation/test/P2P_throughput/config.py @@ -30,7 +30,7 @@ #see iperf.measurement_specs() for the meaning of the values "curves":["a_b_uni", "b_a_uni", "bi"]}, "SNR": { - "values":numpy.arange(40, -10, -5).tolist(), + "values":numpy.arange(35, -10, -5).tolist(), "duration_s":20, #["a_b_uni"|"b_a_uni"|"bi"] #see iperf.measurement_specs() for the meaning of the values @@ -68,7 +68,6 @@ "dynamic_jammer":{ #Must be ["time"] "values":["time"], - #Must be seconds "duration_s":15, #["a_b_uni"|"b_a_uni"|"bi"] #see iperf.measurement_specs() for the meaning of the values @@ -93,7 +92,7 @@ ("UDP", "SJR", (26, ("SINusoid", 1, 80))), ("UDP", "SJR", (27.345, ("SINusoid", 1, 80))), ("UDP", "frame_size", None), - ("UDP", "dynamic_jammer", (10, 2, 30, 60)), + ("UDP", "dynamic_jammer", (5, 2, 30, 60)), ("UDP", "dynamic_jammer", (0, 2, 30, 60)), ("UDP", "dynamic_jammer", (-10, 2, 30, 60)), ("UDP", "dynamic_jammer", (-20, 2, 30, 60)), @@ -116,8 +115,8 @@ #would not be impacted without noise. This value should be deduced from #the results obtained in the 'attenuation' test. If the curve starts going #down at 55 dB and if the minimal attenuation of the bench is 38, - #sjr_attenuator_attenuation_db must be to a value lower than - #(55 - 38) dB = 17 dB and greater than 0 dB, as long as these values are in + #sjr_attenuator_attenuation_db must be set to a value lower than + #(55 - 38) dB = 17 dB and greater than 0 dB, as long as these values are #compatible with the range of attenuation of the variable attenuator. "sjr_attenuator_attenuation_db": 29, #Attenuation of each AMN -- cgit v1.2.3