test suite reviews and discussions
 help / color / mirror / Atom feed
From: "xu,huilong" <huilongx.xu@intel.com>
To: dts@dpdk.org
Subject: [dts]  [PATCH V2] fix yocto init core list failed issue
Date: Wed,  2 Dec 2015 15:18:59 +0800	[thread overview]
Message-ID: <1449040739-5395-1-git-send-email-huilongx.xu@intel.com> (raw)

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 framework/crb.py | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/framework/crb.py b/framework/crb.py
index 3c158ec..3470ca1 100644
--- a/framework/crb.py
+++ b/framework/crb.py
@@ -464,6 +464,16 @@ class Crb(object):
             self.send_expect(
                 "grep --color=never \"processor\\|physical id\\|core id\\|^$\" /proc/cpuinfo",
                 "#", alt_session=True)
+
+        if "processor" not in cpuinfo:              
+            # yocto not support --color=never, but ubuntu must need --color=never, 
+            # so check cpuinfo, before parsing cpuinfo, if cpuifo get error, delete --color=never
+            # and get cpuinfo again
+            cpuinfo = \
+                self.send_expect(
+                    r'grep "processor\|physical id\|core id\|^$" /proc/cpuinfo',
+                    "#", alt_session=True)
+
         cpuinfo = cpuinfo.split('\r\n\r\n')
         # haswell cpu on cottonwood core id not correct
         # need addtional coremap for haswell cpu
-- 
1.9.3

             reply	other threads:[~2015-12-02  7:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-02  7:18 xu,huilong [this message]
2015-12-04  0:47 ` Liu, Yong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449040739-5395-1-git-send-email-huilongx.xu@intel.com \
    --to=huilongx.xu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).