From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH 1/2] test: use env variable to run test if set Date: Mon, 18 Dec 2017 21:11:50 +0530 Message-ID: <20171218154149.GA18012@jerin> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , "Richardson, Bruce" To: "Van Haaren, Harry" Return-path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0074.outbound.protection.outlook.com [104.47.40.74]) by dpdk.org (Postfix) with ESMTP id 9B3A723D for ; Mon, 18 Dec 2017 16:42:23 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- > Date: Mon, 18 Dec 2017 15:24:22 +0000 > From: "Van Haaren, Harry" > To: Jerin Jacob > CC: "dev@dpdk.org" , "Richardson, Bruce" > > Subject: RE: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if > set > > > 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 > > > > -----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 set > > > 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. > > > > 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 using 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=ring_autotest and run that test automatically when the binary is launched. Yup. I don't see any harm in exposing DPDK_TEST means of test selection.