From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 48504A04DD; Thu, 28 Nov 2019 00:01:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0BF381B9A9; Thu, 28 Nov 2019 00:01:25 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 6D8265B3E for ; Thu, 28 Nov 2019 00:01:23 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id DDEAE767; Wed, 27 Nov 2019 18:01:21 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 27 Nov 2019 18:01:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=yFg3xeldDc p60v49z4DZ/OhYxy92ji2qaAp+0FU1ses=; b=q0SnFc2tCzkSQKzcuQ2GwZ+bNM AXV7KtVycZEyMoKZMrJ11vYBvspH/kLbvulqFflVZ81C8Q8GKAHclSukGDMx6pbk kc/LScjViZc1xicc7jM183s+8lEqG3D76Y+RNwKMLVSJEJMsGsop6PXpjUEXNzCC U5FVQ+5cketG5MxXk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=yFg3xeldDcp60v49z4DZ/OhYxy92ji2qaAp+0FU1ses=; b=EdpsVxQ6 IKnri6UrvCYEYPO1/wUAyUO2hgsPRk3sB7vvxWZ+lPQtiuOcLJmngWZQs2296SGQ XgIq3c5QnviCW8cdEwzcIDlaZo0wE789A+/UXEbx9Flypes+rmXxlIljfKbvC2bc PpDN8AlF0OrxU4q0wGSWkdKtHJ6nrLAmgB/pgukgE4KEi5+VFmm2qcXF5bRFfS1f Gji4tpbg0bzgzI2duwcsyJqtEHIAaiRnCO+d2IS3/3A5R22GfMXrt9y6gCHwjNso KCvZYZrZADJ9olFilVnfo3HBSfcW/9hHpWmdnv2f5+bq+xJWXbCyF9KaECCegnU6 0MBsvJMqsRr0/A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeiiedgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 152743060066; Wed, 27 Nov 2019 18:01:19 -0500 (EST) From: Thomas Monjalon To: John McNamara , Marko Kovacevic Cc: david.marchand@redhat.com, ferruh.yigit@intel.com, dev@dpdk.org, Bruce Richardson Date: Thu, 28 Nov 2019 00:00:55 +0100 Message-Id: <20191127230055.23608-1-thomas@monjalon.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191009101026.49019-1-bruce.richardson@intel.com> References: <20191009101026.49019-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] devtools: control location of test builds 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Bruce Richardson By default, both test-build.sh and test-meson-builds.sh scripts create the builds they generate in the current working directory, leading to a large number of build directories being present when testing patches. This patchset modifies both scripts to use a DPDK_BUILD_TEST_DIR environment variable to control where the build outputs are put. For example, doing: export DPDK_BUILD_TEST_DIR=__builds ./devtools/test-meson-builds.sh && ./devtools/test-build.sh \ x86_64-native-linux-clang+shared i686-native-linux-gcc gives a "__builds" directory with 14 meson and 2 make builds (with the meson build count depending on compiler availability) Signed-off-by: Bruce Richardson Signed-off-by: Thomas Monjalon --- v2: - rename DPDK_TEST_BUILD_DIR to DPDK_BUILD_TEST_DIR - add comment in devtools/test-build.sh and its guide section - load from config file in test-meson-builds.sh --- devtools/test-build.sh | 4 +++- devtools/test-meson-builds.sh | 9 ++++++--- doc/guides/contributing/patches.rst | 7 +++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/devtools/test-build.sh b/devtools/test-build.sh index 2bedbdb980..f55d3120aa 100755 --- a/devtools/test-build.sh +++ b/devtools/test-build.sh @@ -7,6 +7,7 @@ default_path=$PATH # Load config options: # - ARMV8_CRYPTO_LIB_PATH # - DPDK_BUILD_TEST_CONFIGS (defconfig1+option1+option2 defconfig2) +# - DPDK_BUILD_TEST_DIR # - DPDK_DEP_ARCHIVE # - DPDK_DEP_BPF (y/[n]) # - DPDK_DEP_CFLAGS @@ -63,6 +64,7 @@ print_help () { [ -z $MAKE ] && echo "Cannot find make or gmake" && exit 1 J=$DPDK_MAKE_JOBS +builds_dir=${DPDK_BUILD_TEST_DIR:-.} short=false unset verbose maxerr=-Wfatal-errors @@ -234,7 +236,7 @@ for conf in $configs ; do . $(dirname $(readlink -f $0))/load-devel-config options=$(echo $conf | sed 's,[^~+]*,,') - dir=$conf + dir=$builds_dir/$conf config $dir $target $options echo "================== Build $dir" diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 07d42985e6..571deec257 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -12,8 +12,11 @@ PIPEFAIL="" set -o | grep -q pipefail && set -o pipefail && PIPEFAIL=1 srcdir=$(dirname $(readlink -f $0))/.. +. $srcdir/devtools/load-devel-config + MESON=${MESON:-meson} use_shared="--default-library=shared" +builds_dir=${DPDK_BUILD_TEST_DIR:-.} if command -v gmake >/dev/null 2>&1 ; then MAKE=gmake @@ -50,7 +53,7 @@ load_env () # build () # { - builddir=$1 + builddir=$builds_dir/$1 shift targetcc=$1 shift @@ -125,8 +128,8 @@ done # Test installation of the x86-default target, to be used for checking # the sample apps build using the pkg-config file for cflags and libs -build_path=build-x86-default -export DESTDIR=$(pwd)/$build_path/install-root +build_path=$(readlink -f $builds_dir/build-x86-default) +export DESTDIR=$build_path/install-root $ninja_cmd -C $build_path install load_env cc diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst index 2140303464..e3246aca5e 100644 --- a/doc/guides/contributing/patches.rst +++ b/doc/guides/contributing/patches.rst @@ -471,6 +471,7 @@ Examples of configs are:: The builds can be modified via the following environmental variables: * ``DPDK_BUILD_TEST_CONFIGS`` (target1+option1+option2 target2) +* ``DPDK_BUILD_TEST_DIR`` * ``DPDK_DEP_CFLAGS`` * ``DPDK_DEP_LDFLAGS`` * ``DPDK_DEP_PCAP`` (y/[n]) @@ -495,6 +496,12 @@ Compilation of patches is to be tested with ``devtools/test-meson-builds.sh`` sc The script internally checks for dependencies, then builds for several combinations of compilation configuration. +By default, each build will be put in a subfolder of the current working directory. +However, if it is preferred to place the builds in a different location, +the environment variable ``DPDK_BUILD_TEST_DIR`` can be set to that desired location. +For example, setting ``DPDK_BUILD_TEST_DIR=__builds`` will put all builds +in a single subfolder called "__builds" created in the current directory. +Setting ``DPDK_BUILD_TEST_DIR`` to an absolute directory path e.g. ``/tmp`` is also supported. Sending Patches -- 2.23.0