test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] dut.py: sort port list to ensure RRC nics will be configured correctly
@ 2016-04-12  1:38 Ding Heng
  2016-04-12  3:41 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Ding Heng @ 2016-04-12  1:38 UTC (permalink / raw)
  To: dts; +Cc: Ding Heng

Signed-off-by: Ding Heng <hengx.ding@intel.com>

diff --git a/framework/dut.py b/framework/dut.py
index bd437cb..291fef0 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -627,6 +627,20 @@ class Dut(Crb):
         """
         Scan ports information or just read it from cache file.
         """
+        #sort ports and ensure that first port of RRC nics will be
+        #initialized first
+        sorted_ports = []
+        ports_cfg = self.conf.get_ports_config()
+        for port_cfg_all in ports_cfg.keys():
+            if 'tp_path' in ports_cfg[port_cfg_all].keys():
+                for port in self.pci_devices_info:
+                    sorted_port = [port]
+                    if port_cfg_all in port:
+                        self.pci_devices_info.remove(port)
+                        for i in self.pci_devices_info:
+                            sorted_port.append(i)
+        self.pci_devices_info = sorted_port
+
         if self.read_cache:
             self.load_serializer_ports()
             self.scan_ports_cached()
-- 
1.9.3

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-12  3:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12  1:38 [dts] [PATCH] dut.py: sort port list to ensure RRC nics will be configured correctly Ding Heng
2016-04-12  3:41 ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).