test suite reviews and discussions
 help / color / mirror / Atom feed
From: Wei Ling <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Wei Ling <weix.ling@intel.com>
Subject: [dts][PATCH V1] tests/metrics: fix start wrong dpdk-proc-info path issue
Date: Thu, 12 Jan 2023 15:50:04 +0800	[thread overview]
Message-ID: <20230112075004.1325372-1-weix.ling@intel.com> (raw)

When using self.dut.alt_session.send_expect() API to create new seesion,
the current directory is /root, not the DPDK base directory, so add
swith to the DPDK base directory step before exectue the dpdk-proc-info
command to start the dpdk-proc-info APP.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_metrics.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/TestSuite_metrics.py b/tests/TestSuite_metrics.py
index f3111ec6..d7262011 100644
--- a/tests/TestSuite_metrics.py
+++ b/tests/TestSuite_metrics.py
@@ -42,6 +42,7 @@ class TestMetrics(TestCase):
 
     def d_a_con(self, cmd):
         _cmd = [cmd, "# ", 10] if isinstance(cmd, str) else cmd
+        self.dut.alt_session.send_expect("cd %s" % self.dut.base_dir, "# ", 10)
         output = self.dut.alt_session.send_expect(*_cmd)
         output2 = self.dut.alt_session.session.get_session_before(2)
         return output + os.linesep + output2
-- 
2.25.1


             reply	other threads:[~2023-01-12  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  7:50 Wei Ling [this message]
2023-01-13  2:45 ` lijuan.tu

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=20230112075004.1325372-1-weix.ling@intel.com \
    --to=weix.ling@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).