summaryrefslogtreecommitdiff
path: root/validation
diff options
context:
space:
mode:
Diffstat (limited to 'validation')
-rw-r--r--validation/test/P2P_throughput/P2P_throughput.py25
-rw-r--r--validation/test/P2P_throughput/config.py3
-rw-r--r--validation/test/P2P_throughput/configs/MCR500_eoc.py3
-rw-r--r--validation/test/P2P_throughput/configs/MPR520_av.py3
-rw-r--r--validation/test/P2P_throughput/configs/SPK300g_eoc.py3
-rw-r--r--validation/validlib/iperf.py11
6 files changed, 27 insertions, 21 deletions
diff --git a/validation/test/P2P_throughput/P2P_throughput.py b/validation/test/P2P_throughput/P2P_throughput.py
index aaaca466f1..139676813a 100644
--- a/validation/test/P2P_throughput/P2P_throughput.py
+++ b/validation/test/P2P_throughput/P2P_throughput.py
@@ -103,10 +103,12 @@ def report(config, config_file):
t0 = time.time()
estimated_min = measurements_estimated_time_min()
print "\nEstimated measurements time in minutes:", estimated_min, "\n"
+ internal_confs_checked = False
iperf_plugs_checked = False
for (test_protocol, test_type, test_params) in config["fixtures"]:
make_measurements(test_protocol, test_type, test_params,
- iperf_plugs_checked)
+ internal_confs_checked, iperf_plugs_checked)
+ internal_confs_checked = True
iperf_plugs_checked = True
actual_min = round((time.time() - t0) / 60.0, 2)
print "Actual/estimated measurements times in minutes:", \
@@ -371,7 +373,7 @@ def measurements_estimated_time_min():
return 1.5 * time_s / 60
def make_measurements(test_protocol, test_type, test_params,
- iperf_plugs_checked):
+ internal_confs_checked, iperf_plugs_checked):
"""Remove the previous measurements, modify the channel, restart the
plugs, execute the new measurements and dump the results in files"""
print "Removing the previous files of results...\n"
@@ -383,7 +385,18 @@ def make_measurements(test_protocol, test_type, test_params,
print "Starting the measurements of the maximum", test_protocol, \
"throughput vs the", test_type, "..."
initialize_testing_devices()
- restart_plugs(iperf_plugs_checked)
+
+ first_restarted_plug = iperf.first_restarted_plug()
+
+ if internal_confs_checked == False:
+ ref_internal_conf = config["internal_conf"]
+ spc300.check_internal_confs(ref_internal_conf, first_restarted_plug)
+
+ if config["restart_plugs"]:
+ plug.restart_all(first_restarted_plug)
+
+ if iperf_plugs_checked == False:
+ iperf.check_plugs(get_reports_directory())
test_values = get_test_values(test_type)
if test_values == ["time"]:
@@ -405,12 +418,6 @@ def initialize_testing_devices():
attenuator.set_attenuation(0)
waveform_generator.switch("off")
-def restart_plugs(iperf_plugs_checked):
- if config["restart_plugs"]:
- iperf.switch_on_plugs()
- if iperf_plugs_checked == False:
- iperf.check_plugs(get_reports_directory())
-
def get_attenuation_offset():
"""Offset allowing to convert the overall attenuation in the attenuation
at the attenuator level (attenuation = overall attenuation - offset)"""
diff --git a/validation/test/P2P_throughput/config.py b/validation/test/P2P_throughput/config.py
index 06f1bc6b01..84d04636cd 100644
--- a/validation/test/P2P_throughput/config.py
+++ b/validation/test/P2P_throughput/config.py
@@ -193,5 +193,6 @@
"plug_key":(1, 5, "slave"),
"ftp_server_root":"/var/all_ftp"
}
- }
+ },
+ "internal_conf":{},
}
diff --git a/validation/test/P2P_throughput/configs/MCR500_eoc.py b/validation/test/P2P_throughput/configs/MCR500_eoc.py
index 4fea033890..236c7456fa 100644
--- a/validation/test/P2P_throughput/configs/MCR500_eoc.py
+++ b/validation/test/P2P_throughput/configs/MCR500_eoc.py
@@ -85,5 +85,6 @@
"plug_key":(1, 5, "slave"),
"ftp_server_root":"/var/all_ftp"
}
- }
+ },
+ "internal_conf":{},
}
diff --git a/validation/test/P2P_throughput/configs/MPR520_av.py b/validation/test/P2P_throughput/configs/MPR520_av.py
index a6ccd76d43..30fcaeacd4 100644
--- a/validation/test/P2P_throughput/configs/MPR520_av.py
+++ b/validation/test/P2P_throughput/configs/MPR520_av.py
@@ -85,5 +85,6 @@
"plug_key":(1, 5, "STA"),
"ftp_server_root":"/home/spidcom"
}
- }
+ },
+ "internal_conf":{},
}
diff --git a/validation/test/P2P_throughput/configs/SPK300g_eoc.py b/validation/test/P2P_throughput/configs/SPK300g_eoc.py
index 2fce5e733e..4c149f9410 100644
--- a/validation/test/P2P_throughput/configs/SPK300g_eoc.py
+++ b/validation/test/P2P_throughput/configs/SPK300g_eoc.py
@@ -85,5 +85,6 @@
"plug_key":(1, 5, "slave"),
"ftp_server_root":"/var/all_ftp"
}
- }
+ },
+ "internal_conf":{},
}
diff --git a/validation/validlib/iperf.py b/validation/validlib/iperf.py
index bd8a28d004..cc89cf7012 100644
--- a/validation/validlib/iperf.py
+++ b/validation/validlib/iperf.py
@@ -79,16 +79,11 @@ def set_tokens():
non_plc_ip_address = config[host]["non_plc_ip_address"]
host_token.set(user, non_plc_ip_address)
-def switch_on_plugs():
- """Switch on the plugs and erase the traces files.
- We always switch on the host A first, and then the host B, in order to
+def first_restarted_plug():
+ """ We always switch on the host A first, and then the host B, in order to
have more repeatable results (the first plug to be switched on may be the
CCO for instance)."""
- for host in ["host_a", "host_b"]:
- key = config[host]["plug_key"]
- plug.switch_off(key)
- plug.switch_on(key)
- clean_trace(host)
+ return config["host_a"]["plug_key"]
def bench_data():
return dict(non_plc_ip_address_a = non_plc_ip_address("host_a"),