* [dpdk-dev] [PATCH] devtools: control location of test builds @ 2019-10-09 10:10 Bruce Richardson 2019-11-27 23:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon 0 siblings, 1 reply; 6+ messages in thread From: Bruce Richardson @ 2019-10-09 10:10 UTC (permalink / raw) To: thomas, david.marchand; +Cc: dev, ferruh.yigit, 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_TEST_BUILD_DIR environment variable to control where the build outputs are put. For example, doing: export DPDK_TEST_BUILD_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 <bruce.richardson@intel.com> --- devtools/test-build.sh | 3 ++- devtools/test-meson-builds.sh | 7 ++++--- doc/guides/contributing/patches.rst | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/devtools/test-build.sh b/devtools/test-build.sh index 2bedbdb98..b64c963d7 100755 --- a/devtools/test-build.sh +++ b/devtools/test-build.sh @@ -63,6 +63,7 @@ print_help () { [ -z $MAKE ] && echo "Cannot find make or gmake" && exit 1 J=$DPDK_MAKE_JOBS +builds_dir=${DPDK_TEST_BUILD_DIR:-.} short=false unset verbose maxerr=-Wfatal-errors @@ -234,7 +235,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 08e83eb5c..f61709761 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -14,6 +14,7 @@ set -o | grep -q pipefail && set -o pipefail && PIPEFAIL=1 srcdir=$(dirname $(readlink -f $0))/.. MESON=${MESON:-meson} use_shared="--default-library=shared" +builds_dir=${DPDK_TEST_BUILD_DIR:-.} if command -v gmake >/dev/null 2>&1 ; then MAKE=gmake @@ -50,7 +51,7 @@ load_env () # <target compiler> build () # <directory> <target compiler> <meson options> { - builddir=$1 + builddir=$builds_dir/$1 shift targetcc=$1 shift @@ -125,8 +126,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 9e1013b70..b2d94fb28 100644 --- a/doc/guides/contributing/patches.rst +++ b/doc/guides/contributing/patches.rst @@ -495,6 +495,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_TEST_BUILD_DIR`` can be set to that desired location. +For example, setting ``DPDK_TEST_BUILD_DIR=__builds`` will put all builds +in a single subfolder called "__builds" created in the current directory. +Setting ``DPDK_TEST_BUILD_DIR`` to an absolute directory path e.g. ``/tmp`` is also supported. Sending Patches -- 2.21.0 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] devtools: control location of test builds 2019-10-09 10:10 [dpdk-dev] [PATCH] devtools: control location of test builds Bruce Richardson @ 2019-11-27 23:00 ` Thomas Monjalon 2019-11-28 9:48 ` Bruce Richardson ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Thomas Monjalon @ 2019-11-27 23:00 UTC (permalink / raw) To: John McNamara, Marko Kovacevic Cc: david.marchand, ferruh.yigit, dev, Bruce Richardson From: Bruce Richardson <bruce.richardson@intel.com> 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 <bruce.richardson@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net> --- 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 () # <target compiler> build () # <directory> <target compiler> <meson options> { - 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: control location of test builds 2019-11-27 23:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon @ 2019-11-28 9:48 ` Bruce Richardson 2019-11-28 11:47 ` Trahe, Fiona 2019-11-28 18:40 ` David Marchand 2 siblings, 0 replies; 6+ messages in thread From: Bruce Richardson @ 2019-11-28 9:48 UTC (permalink / raw) To: Thomas Monjalon Cc: John McNamara, Marko Kovacevic, david.marchand, ferruh.yigit, dev On Thu, Nov 28, 2019 at 12:00:55AM +0100, Thomas Monjalon wrote: > From: Bruce Richardson <bruce.richardson@intel.com> > > 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 <bruce.richardson@intel.com> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net> > --- > 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 > --- Thanks for the update, those seem ok changes to me. The doc one I should have caught in the V1, so it's especially welcome. /Bruce ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: control location of test builds 2019-11-27 23:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon 2019-11-28 9:48 ` Bruce Richardson @ 2019-11-28 11:47 ` Trahe, Fiona 2019-11-28 13:20 ` Thomas Monjalon 2019-11-28 18:40 ` David Marchand 2 siblings, 1 reply; 6+ messages in thread From: Trahe, Fiona @ 2019-11-28 11:47 UTC (permalink / raw) To: Thomas Monjalon, Mcnamara, John, Kovacevic, Marko Cc: david.marchand, Yigit, Ferruh, dev, Richardson, Bruce, Trahe, Fiona HI Bruce, Thomas, Doesn't the RTE_OUTPUT environment var already resolve this issue? Fiona > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Thomas Monjalon > Sent: Wednesday, November 27, 2019 11:01 PM > To: Mcnamara, John <john.mcnamara@intel.com>; Kovacevic, Marko <marko.kovacevic@intel.com> > Cc: david.marchand@redhat.com; Yigit, Ferruh <ferruh.yigit@intel.com>; dev@dpdk.org; Richardson, > Bruce <bruce.richardson@intel.com> > Subject: [dpdk-dev] [PATCH v2] devtools: control location of test builds > > From: Bruce Richardson <bruce.richardson@intel.com> > > 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 <bruce.richardson@intel.com> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net> > --- > 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 () # <target compiler> > > build () # <directory> <target compiler> <meson options> > { > - 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: control location of test builds 2019-11-28 11:47 ` Trahe, Fiona @ 2019-11-28 13:20 ` Thomas Monjalon 0 siblings, 0 replies; 6+ messages in thread From: Thomas Monjalon @ 2019-11-28 13:20 UTC (permalink / raw) To: Trahe, Fiona Cc: Mcnamara, John, Kovacevic, Marko, david.marchand, Yigit, Ferruh, dev, Richardson, Bruce 28/11/2019 12:47, Trahe, Fiona: > HI Bruce, Thomas, > Doesn't the RTE_OUTPUT environment var already resolve this issue? RTE_OUTPUT is for the build directory, yes. This patch is about having a top-level directory for all builds done by the build test scripts. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] devtools: control location of test builds 2019-11-27 23:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon 2019-11-28 9:48 ` Bruce Richardson 2019-11-28 11:47 ` Trahe, Fiona @ 2019-11-28 18:40 ` David Marchand 2 siblings, 0 replies; 6+ messages in thread From: David Marchand @ 2019-11-28 18:40 UTC (permalink / raw) To: Thomas Monjalon Cc: John McNamara, Marko Kovacevic, Yigit, Ferruh, dev, Bruce Richardson On Thu, Nov 28, 2019 at 12:01 AM Thomas Monjalon <thomas@monjalon.net> wrote: > > From: Bruce Richardson <bruce.richardson@intel.com> > > 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 <bruce.richardson@intel.com> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: David Marchand <david.marchand@redhat.com> Applied, thanks. -- David Marchand ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-11-28 18:40 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-10-09 10:10 [dpdk-dev] [PATCH] devtools: control location of test builds Bruce Richardson 2019-11-27 23:00 ` [dpdk-dev] [PATCH v2] " Thomas Monjalon 2019-11-28 9:48 ` Bruce Richardson 2019-11-28 11:47 ` Trahe, Fiona 2019-11-28 13:20 ` Thomas Monjalon 2019-11-28 18:40 ` David Marchand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).