From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A9347160 for ; Mon, 18 Dec 2017 16:24:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2017 07:24:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,422,1508828400"; d="scan'208";a="3341436" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by fmsmga007.fm.intel.com with ESMTP; 18 Dec 2017 07:24:23 -0800 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.180]) by IRSMSX154.ger.corp.intel.com ([169.254.12.83]) with mapi id 14.03.0319.002; Mon, 18 Dec 2017 15:24:22 +0000 From: "Van Haaren, Harry" To: Jerin Jacob CC: "dev@dpdk.org" , "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if set Thread-Index: AQHTd/bpO0hzUKW9X0WG+kJJ43bSwaNJMaIAgAACKfA= Date: Mon, 18 Dec 2017 15:24:22 +0000 Message-ID: References: <1513598038-148115-1-git-send-email-harry.van.haaren@intel.com> <1513598038-148115-2-git-send-email-harry.van.haaren@intel.com> <20171218145918.GA14509@jerin> In-Reply-To: <20171218145918.GA14509@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjMzZDRhZDMtZWFhZS00MjgxLTllOTMtMTRhZjJmNDhmYjljIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ik1vb0ZJb0ZJZldzQU1rdno4OXVTazRVZ2x4Wlc1UGtmcCtVK1Y2Q2pWVXM9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if set X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2017 15:24:27 -0000 > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Monday, December 18, 2017 2:59 PM > To: Van Haaren, Harry > Cc: dev@dpdk.org; Richardson, Bruce > Subject: Re: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if > set >=20 > -----Original Message----- > > Date: Mon, 18 Dec 2017 11:53:57 +0000 > > From: Harry van Haaren > > To: dev@dpdk.org > > CC: bruce.richardson@intel.com, Harry van Haaren > > > > Subject: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if s= et > > X-Mailer: git-send-email 2.7.4 > > > > This commit paves the way for the meson tests in the next > > patch. With this patch the test binary checks the DPDK_TEST > > environment variable and if set, the contents of the var > > are inserted on the test app command line, and run. > > > > This allows testing of various different unit tests without > > manual interaction with the RTE>> test prompt, instead automating > > it using the DPDK_TEST environment variable. >=20 > Another alternative is to pipe the command. > example: > echo "eventdev_common_autotest" | sudo ./build/app/test With the current implementation, meson handles which tests to run, and the = command line. This gives us a clean interface from which to run tests. Note= that the following command will run the tests requested: $ meson test ring_autotest ring_perf_autotest acl_autotest Meson itself supports two methods of launching tests from the same binary: = argv and env variables. In this implementation, the DPDK_TEST env is set by= the test runner - and the user doesn't have to use it manually at all, and= it is not exported in the shell after the tests have run. In short - I don't see added value in reworking this to argc argv, or in us= ing terminal tricks like echo "test" | sudo ./test. Actually, the current method has an easter egg included: If a developer is focused on a single test-case (TDD anyone? :), then they = could use the DPDK_TEST env var as a feature, $ export DPDK_TEST=3Dring_aut= otest and run that test automatically when the binary is launched.