summaryrefslogtreecommitdiff
path: root/validation
diff options
context:
space:
mode:
authorJean-Philippe NOEL2013-04-23 17:54:59 +0200
committerJean-Philippe NOEL2013-05-24 10:12:35 +0200
commite7ec1eb1bab28de59bd6bf434549b2dacdebc14a (patch)
treebcfb9024aec8f66e611e507c55d83d6670bd2658 /validation
parent9e96b57767489e942578edc841c38ee57e09953b (diff)
validation: start the CCO first, refs #4001
Diffstat (limited to 'validation')
-rw-r--r--validation/test/P2MP_throughput/P2MP_throughput.py24
-rw-r--r--validation/test/P2MP_throughput/config.py3
-rw-r--r--validation/test/P2MP_throughput/configs/MPR520_1_STAs.py3
-rw-r--r--validation/test/P2MP_throughput/configs/MPR520_summary.py4
-rw-r--r--validation/test/P2MP_throughput/configs/MSE500-200_16_slaves.py2
-rw-r--r--validation/test/P2MP_throughput/configs/MSE500-500_16_slaves.py2
-rw-r--r--validation/test/P2MP_throughput/configs/MSE500-500_32_slaves.py2
-rw-r--r--validation/test/P2MP_throughput/configs/MSE500-500_64_slaves.py2
-rw-r--r--validation/test/P2MP_throughput/configs/MSE500-500_summary.py2
-rw-r--r--validation/test/P2MP_throughput/configs/SPC200_16_slaves.py2
-rw-r--r--validation/test/P2MP_throughput/configs/SPC300_16_slaves.py2
-rw-r--r--validation/validlib/ixia.py10
-rw-r--r--validation/validlib/plug.py12
13 files changed, 36 insertions, 34 deletions
diff --git a/validation/test/P2MP_throughput/P2MP_throughput.py b/validation/test/P2MP_throughput/P2MP_throughput.py
index 49e7c32f1f..edceee6c32 100644
--- a/validation/test/P2MP_throughput/P2MP_throughput.py
+++ b/validation/test/P2MP_throughput/P2MP_throughput.py
@@ -106,6 +106,9 @@ def check_config():
("The are duplicates among the generated figures files",
figures_files)
+ # We check that the key of the CCO is the key of a plug
+ assert config["cco_key"] in plug.get_keys()
+
def build_rst_file(bench_fig_name, mesh_bench_fig_name, traces_files):
rst_template_dict = {"bench_fig_name":bench_fig_name,
"mesh_bench_fig_name":mesh_bench_fig_name}
@@ -158,7 +161,7 @@ def make_measurements():
for power_plug_key in config["power_plugs_off"]:
power_strip.switch("off", power_plug_key)
- ixia_master_plug_checked = False
+ cco_plug_checked = False
# One must take here the general directory, not the one
# specific to each test in config["tests"], since it must designate
@@ -176,19 +179,26 @@ def make_measurements():
if config["restart_plugs"]:
restart_plugs()
- # We check the Ixia master only once
- if ixia_master_plug_checked == False:
- ixia.check_master_plug(prim_directory)
- ixia_master_plug_checked = True
+ # We check only the CCO, and only once
+ if cco_plug_checked == False:
+ check_cco_plug(prim_directory)
+ cco_plug_checked = True
ixia.execute(test_type, slaves_nb, direction, prim_directory,
parameters, config["ftp_server"])
+def check_cco_plug(directory):
+ key = config["cco_key"]
+ plug.check_version_in_directory(key, directory)
+ plug.check_plc_rom(key)
+
def restart_plugs():
# We switch off all the plugs
plug.switch_off_all()
- # We switch on all the plugs
- plug.switch_on_all()
+ # We switch on the CCO first
+ plug.switch_on(config["cco_key"])
+ # We switch on all the other plugs
+ plug.switch_on_all([config["cco_key"]])
def destination_file_name():
reports_directory = get_reports_directory()
diff --git a/validation/test/P2MP_throughput/config.py b/validation/test/P2MP_throughput/config.py
index 4d6d240c51..173affb1a3 100644
--- a/validation/test/P2MP_throughput/config.py
+++ b/validation/test/P2MP_throughput/config.py
@@ -46,6 +46,8 @@
#Root directory of the FTP server
"root":"/var/all_ftp"
},
+ # Key of the CCO, i.e. of the plug switched on in first place
+ "cco_key":(1, 2, "master"),
# [("tput" (for throughput) | "latency" (for latency) |
# "bcast" (for broadcast) | "floss" (for frame loss),
# Type of Ixia test
@@ -168,7 +170,6 @@
"ixia":{
"scripts_path":"ixos/scripts",
"results_path":"ixos/Results",
- "master_key":(1, 2, "master"),
"master_port":"1.3.1",
"slave_port":"1.3.2",
"min_vlan_id":11
diff --git a/validation/test/P2MP_throughput/configs/MPR520_1_STAs.py b/validation/test/P2MP_throughput/configs/MPR520_1_STAs.py
index ae37f7e107..863d34fbe8 100644
--- a/validation/test/P2MP_throughput/configs/MPR520_1_STAs.py
+++ b/validation/test/P2MP_throughput/configs/MPR520_1_STAs.py
@@ -11,6 +11,7 @@
"plc_ip_address":"10.3.17.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 1, "CCO"),
"tests":
[
("mesh",
@@ -48,9 +49,7 @@
}
},
"ixia":{
- "scripts_path":"ixos/scripts",
"results_path":"ixos/Results",
- "master_key":(1, 1, "CCO"),
"master_port":"1.2.1",
"slave_port":"1.2.2",
"min_vlan_id":None
diff --git a/validation/test/P2MP_throughput/configs/MPR520_summary.py b/validation/test/P2MP_throughput/configs/MPR520_summary.py
index 54c426755b..ddc11954f5 100644
--- a/validation/test/P2MP_throughput/configs/MPR520_summary.py
+++ b/validation/test/P2MP_throughput/configs/MPR520_summary.py
@@ -1,4 +1,3 @@
-
{
"parent":None,
"restart_plugs":False,
@@ -12,6 +11,7 @@
"plc_ip_address":"10.3.17.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 1, "CCO"),
"tests":
[
("mesh",
@@ -89,9 +89,7 @@
}
},
"ixia":{
- "scripts_path":"ixos/scripts",
"results_path":"ixos/Results",
- "master_key":(1, 1, "CCO"),
"master_port":"1.2.1",
"slave_port":"1.2.2",
"min_vlan_id":None
diff --git a/validation/test/P2MP_throughput/configs/MSE500-200_16_slaves.py b/validation/test/P2MP_throughput/configs/MSE500-200_16_slaves.py
index 12ee9908bd..a7aeaa0cc0 100644
--- a/validation/test/P2MP_throughput/configs/MSE500-200_16_slaves.py
+++ b/validation/test/P2MP_throughput/configs/MSE500-200_16_slaves.py
@@ -6,6 +6,7 @@
"sec_reports_directory":"polux-5.0.3/MSE500-200/16_slaves",
"power_plugs_off":[(1, [2, 4, 8])],
"ftp_server":None,
+ "cco_key":(1, 1, "master"),
"tests":
[
("tput",
@@ -99,7 +100,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 1, "master"),
"master_port":"1.1.1",
"slave_port":"1.1.2",
"min_vlan_id":201
diff --git a/validation/test/P2MP_throughput/configs/MSE500-500_16_slaves.py b/validation/test/P2MP_throughput/configs/MSE500-500_16_slaves.py
index e61a46d8b7..2293b4d3a1 100644
--- a/validation/test/P2MP_throughput/configs/MSE500-500_16_slaves.py
+++ b/validation/test/P2MP_throughput/configs/MSE500-500_16_slaves.py
@@ -11,6 +11,7 @@
"plc_ip_address":"192.168.3.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 1, "master"),
"tests":
[
("tput",
@@ -104,7 +105,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 1, "master"),
"master_port":"1.3.1",
"slave_port":"1.3.2",
"min_vlan_id":43
diff --git a/validation/test/P2MP_throughput/configs/MSE500-500_32_slaves.py b/validation/test/P2MP_throughput/configs/MSE500-500_32_slaves.py
index 9ee6e1f44f..18e20ef0e9 100644
--- a/validation/test/P2MP_throughput/configs/MSE500-500_32_slaves.py
+++ b/validation/test/P2MP_throughput/configs/MSE500-500_32_slaves.py
@@ -11,6 +11,7 @@
"plc_ip_address":"192.168.3.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 1, "master"),
"tests":
[
("tput",
@@ -120,7 +121,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 1, "master"),
"master_port":"1.3.1",
"slave_port":"1.3.2",
"min_vlan_id":43
diff --git a/validation/test/P2MP_throughput/configs/MSE500-500_64_slaves.py b/validation/test/P2MP_throughput/configs/MSE500-500_64_slaves.py
index 2423dc2801..d6fbbc1b35 100644
--- a/validation/test/P2MP_throughput/configs/MSE500-500_64_slaves.py
+++ b/validation/test/P2MP_throughput/configs/MSE500-500_64_slaves.py
@@ -11,6 +11,7 @@
"plc_ip_address":"192.168.3.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 1, "master"),
"tests":
[
("tput",
@@ -152,7 +153,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 1, "master"),
"master_port":"1.3.1",
"slave_port":"1.3.2",
"min_vlan_id":11
diff --git a/validation/test/P2MP_throughput/configs/MSE500-500_summary.py b/validation/test/P2MP_throughput/configs/MSE500-500_summary.py
index 31c4cb0541..aa18b3c1fb 100644
--- a/validation/test/P2MP_throughput/configs/MSE500-500_summary.py
+++ b/validation/test/P2MP_throughput/configs/MSE500-500_summary.py
@@ -11,6 +11,7 @@
"plc_ip_address":"192.168.3.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 1, "master"),
"tests":
[
("tput",
@@ -268,7 +269,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 1, "master"),
"master_port":"1.3.1",
"slave_port":"1.3.2",
"min_vlan_id":11
diff --git a/validation/test/P2MP_throughput/configs/SPC200_16_slaves.py b/validation/test/P2MP_throughput/configs/SPC200_16_slaves.py
index 4f78fc9087..b166d444d7 100644
--- a/validation/test/P2MP_throughput/configs/SPC200_16_slaves.py
+++ b/validation/test/P2MP_throughput/configs/SPC200_16_slaves.py
@@ -6,6 +6,7 @@
"sec_reports_directory":"polux-5.0.4/SPC200/16_slaves",
"power_plugs_off":[(1, [1, 3, 8])],
"ftp_server":None,
+ "cco_key":(1, 2, "master"),
"tests":
[
("tput",
@@ -99,7 +100,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 2, "master"),
"master_port":"1.1.1",
"slave_port":"1.1.2",
"min_vlan_id":201
diff --git a/validation/test/P2MP_throughput/configs/SPC300_16_slaves.py b/validation/test/P2MP_throughput/configs/SPC300_16_slaves.py
index d6a657c085..94d5e8e43a 100644
--- a/validation/test/P2MP_throughput/configs/SPC300_16_slaves.py
+++ b/validation/test/P2MP_throughput/configs/SPC300_16_slaves.py
@@ -11,6 +11,7 @@
"plc_ip_address":"192.168.10.254",
"root":"/var/all_ftp"
},
+ "cco_key":(1, 2, "master"),
"tests":
[
("tput",
@@ -104,7 +105,6 @@
},
"ixia":{
"results_path":"ixos/Results",
- "master_key":(1, 2, "master"),
"master_port":"1.4.1",
"slave_port":"1.4.2",
"min_vlan_id":101
diff --git a/validation/validlib/ixia.py b/validation/validlib/ixia.py
index 784cc633a3..f17d62b18d 100644
--- a/validation/validlib/ixia.py
+++ b/validation/validlib/ixia.py
@@ -16,8 +16,6 @@ config = {
# Path, relative to the home directory, of the directory containing the
# Ixia results
"results_path":"ixos/Results",
- # Key of the plug of the Ixia master in spc300 or non_spc300
- "master_key":(1, 2, "master"),
# Ixia port of the master, with the syntax X.Y.Z where
# X is the chassis index, Y is the board index and Z is the port index
"master_port":"1.3.1",
@@ -35,11 +33,6 @@ font = {'color':'k',
'fontweight':'bold',
'fontsize':10}
-def check_master_plug(directory):
- key = config["master_key"]
- plug.check_version_in_directory(key, directory)
- plug.check_plc_rom(key)
-
def results_path():
return os.path.join(os.getenv("HOME"), config["results_path"])
@@ -48,9 +41,6 @@ def update_config(new_config):
global config
config = new_config
- # We check that the key of the Ixia master is the key of a plug
- assert config["master_key"] in plug.get_keys()
-
parse_port(config["master_port"])
parse_port(config["slave_port"])
diff --git a/validation/validlib/plug.py b/validation/validlib/plug.py
index 007d65a53f..a0c2114df4 100644
--- a/validation/validlib/plug.py
+++ b/validation/validlib/plug.py
@@ -35,10 +35,14 @@ def switch_off_all():
def switch_on(key):
get_module(key).switch_on(key)
-def switch_on_all():
- """We switch on all the plugs"""
- spc300.switch_on(spc300.config["plugs"].keys())
- non_spc300.switch_on(non_spc300.config["plugs"].keys())
+def switch_on_all(excluded_keys):
+ """We switch on all the plugs except the excluded ones"""
+ keys = list_utils.substract(spc300.config["plugs"].keys(),
+ excluded_keys)
+ spc300.switch_on(keys)
+ keys = list_utils.substract(non_spc300.config["plugs"].keys(),
+ excluded_keys)
+ non_spc300.switch_on(keys)
def get_keys():
return spc300.config["plugs"].keys() + non_spc300.config["plugs"].keys()