From patchwork Mon Sep 7 11:10:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, YuX" X-Patchwork-Id: 76684 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 64530A04B7; Mon, 7 Sep 2020 13:11:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4276D1C0CC; Mon, 7 Sep 2020 13:11:34 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id EC1D71BE0C for ; Mon, 7 Sep 2020 13:11:31 +0200 (CEST) IronPort-SDR: 7Gy/2lWH3u5RwIBcQMtwHKRfriBai3fcz0OCLPDvFNhPc3qP9WCick2FICzyWK49fz6QmDO4Wm ROkY9auRiBXw== X-IronPort-AV: E=McAfee;i="6000,8403,9736"; a="222197533" X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="222197533" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2020 04:11:31 -0700 IronPort-SDR: jBqifuTOKKn+tzZ+ScRIbmiIiYHrAmnYGZyO/DUJXVehI0gXy1ejXhNTh+uNcgX9aguaHEgtci FFOy0vpSFGKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,401,1592895600"; d="scan'208";a="316841879" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga002.jf.intel.com with ESMTP; 07 Sep 2020 04:11:30 -0700 From: "Jiang, YuX" To: dts@dpdk.org Cc: "Jiang,yu" , Jiang@dpdk.org Date: Mon, 7 Sep 2020 19:10:34 +0800 Message-Id: <20200907111035.7697-9-yux.jiang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200907111035.7697-1-yux.jiang@intel.com> References: <20200907111035.7697-1-yux.jiang@intel.com> Subject: [dts] [PATCH V1 8/9] tests/TestSuite_virtio_unit_cryptodev_func: support meson build X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: "Jiang,yu" adapt to support both meson and makefile build Signed-off-by: Jiang,yu --- tests/TestSuite_virtio_unit_cryptodev_func.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_virtio_unit_cryptodev_func.py b/tests/TestSuite_virtio_unit_cryptodev_func.py index d8f56e2..336af7a 100644 --- a/tests/TestSuite_virtio_unit_cryptodev_func.py +++ b/tests/TestSuite_virtio_unit_cryptodev_func.py @@ -43,8 +43,8 @@ import cryptodev_common as cc class VirtioCryptodevUnitTest(TestCase): def set_up_all(self): - self.sample_app= "./examples/vhost_crypto/build/vhost-crypto" - self.user_app = "./{target}/app/test".format(target=self.dut.target) + self.sample_app = self.dut.apps_name['vhost_crypto'] + self.user_app = self.dut.apps_name['test'] self.vm0, self.vm0_dut = None, None self.dut.skip_setup = True @@ -58,7 +58,7 @@ class VirtioCryptodevUnitTest(TestCase): self.dut.skip_setup = False cc.build_dpdk_with_cryptodev(self) cc.bind_qat_device(self) - self.build_vhost_app() + self.dut.build_dpdk_apps("./examples/vhost_crypto") self.vf_assign_method = "vfio-pci" self.dut.setup_modules(None, self.vf_assign_method, None) @@ -86,12 +86,6 @@ class VirtioCryptodevUnitTest(TestCase): def dut_execut_cmd(self, cmdline, ex='#', timout=30): return self.dut.send_expect(cmdline, ex, timout) - def build_vhost_app(self): - out = self.dut_execut_cmd("make -C ./examples/vhost_crypto") - - self.verify("Error" not in out, "compilation error 1") - self.verify("No such file" not in out, "compilation error 2") - def get_vhost_eal(self): default_eal_opts = { "c": None, @@ -202,7 +196,8 @@ class VirtioCryptodevUnitTest(TestCase): self.used_dut_port = None self.dut_execut_cmd("^C", "# ") - self.dut_execut_cmd("killall -s INT vhost-crypto") + self.app_name = self.sample_app[self.sample_app.rfind('/')+1:] + self.dut.send_expect("killall -s INT %s" % self.app_name, "#") self.dut_execut_cmd("killall -s INT qemu-system-x86_64") self.dut_execut_cmd("rm -r /tmp/*")