[V1] tests/metrics: fix start wrong dpdk-proc-info path issue
Checks
Context |
Check |
Description |
ci/Intel-dts-format-test |
success
|
Testing OK
|
ci/Intel-dts-pylama-test |
success
|
Testing OK
|
ci/Intel-dts-suite-test |
warning
|
SKIPPED
|
Commit Message
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(+)
Comments
On Thu, 12 Jan 2023 15:50:04 +0800, Wei Ling <weix.ling@intel.com> wrote:
> 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>
Applied, thanks
@@ -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