From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 5/8] scripts: allow tuning build options per test target
Date: Tue, 29 Mar 2016 18:15:51 +0200 [thread overview]
Message-ID: <1459268154-29558-6-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1459268154-29558-1-git-send-email-thomas.monjalon@6wind.com>
The global variables are reloaded between each build to allow
having different config options based on DPDK_TARGET.
Some checks can now be removed from the script as they can
be done in the devel config file.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
scripts/test-build.sh | 34 +++++++++++++++++++++++++++-------
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/scripts/test-build.sh b/scripts/test-build.sh
index ffa7bea..f28c289 100755
--- a/scripts/test-build.sh
+++ b/scripts/test-build.sh
@@ -30,6 +30,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+default_path=$PATH
+
# Load config options:
# - AESNI_MULTI_BUFFER_LIB_PATH
# - DPDK_BUILD_TEST_CONFIGS (target1+option1+option2 target2)
@@ -37,6 +39,10 @@
# - DPDK_DEP_LDFLAGS
# - DPDK_DEP_MOFED (y/[n])
# - DPDK_DEP_PCAP (y/[n])
+# - DPDK_DEP_SSL (y/[n])
+# - DPDK_DEP_SZE (y/[n])
+# - DPDK_DEP_ZLIB (y/[n])
+# - DPDK_MAKE_JOBS (int)
# - DPDK_NOTIFY (notify-send)
. $(dirname $(readlink -e $0))/load-devel-config.sh
@@ -94,6 +100,21 @@ trap on_exit EXIT
cd $(dirname $(readlink -m $0))/..
+reset_env ()
+{
+ export PATH=$default_path
+ unset CROSS
+ unset DPDK_DEP_CFLAGS
+ unset DPDK_DEP_LDFLAGS
+ unset DPDK_DEP_MOFED
+ unset DPDK_DEP_PCAP
+ unset DPDK_DEP_SSL
+ unset DPDK_DEP_SZE
+ unset DPDK_DEP_ZLIB
+ unset AESNI_MULTI_BUFFER_LIB_PATH
+ unset PQOS_INSTALL_PATH
+}
+
config () # <directory> <target> <options>
{
if [ ! -e $1/.config ] ; then
@@ -103,16 +124,14 @@ config () # <directory> <target> <options>
sed -ri 's,(NEXT_ABI=)y,\1n,' $1/.config
! echo $3 | grep -q shared || \
sed -ri 's,(SHARED_LIB=)n,\1y,' $1/.config
- echo $2 | grep -q '^i686' || \
+ ! echo $2 | grep -q '^x86_64' || \
sed -ri 's,(NUMA=)n,\1y,' $1/.config
sed -ri 's,(PCI_CONFIG=)n,\1y,' $1/.config
sed -ri 's,(LIBRTE_IEEE1588=)n,\1y,' $1/.config
sed -ri 's,(BYPASS=)n,\1y,' $1/.config
test "$DPDK_DEP_MOFED" != y || \
- echo $2 | grep -q '^clang$' || \
sed -ri 's,(MLX._PMD=)n,\1y,' $1/.config
test "$DPDK_DEP_SZE" != y || \
- echo $2 | grep -q '^i686' || \
sed -ri 's,(PMD_SZEDATA2=)n,\1y,' $1/.config
test "$DPDK_DEP_ZLIB" != y || \
sed -ri 's,(BNX2X_PMD=)n,\1y,' $1/.config
@@ -120,17 +139,13 @@ config () # <directory> <target> <options>
test "$DPDK_DEP_PCAP" != y || \
sed -ri 's,(PCAP=)n,\1y,' $1/.config
test -z "$AESNI_MULTI_BUFFER_LIB_PATH" || \
- ! echo $2 | grep -q '^x86_64' || \
sed -ri 's,(PMD_AESNI_MB=)n,\1y,' $1/.config
test -z "$AESNI_MULTI_BUFFER_LIB_PATH" || \
- ! echo $2 | grep -q '^x86_64' || \
sed -ri 's,(PMD_AESNI_GCM=)n,\1y,' $1/.config
test "$DPDK_DEP_SSL" != y || \
sed -ri 's,(PMD_QAT=)n,\1y,' $1/.config
sed -ri 's,(KNI_VHOST.*=)n,\1y,' $1/.config
sed -ri 's,(SCHED_.*=)n,\1y,' $1/.config
- ! echo $2 | grep -q '^i686' || \
- sed -ri 's,(POWER=)y,\1n,' $1/.config
sed -ri 's,(TEST_PMD_RECORD_.*=)n,\1y,' $1/.config
sed -ri 's,(DEBUG.*=)n,\1y,' $1/.config
fi
@@ -138,6 +153,11 @@ config () # <directory> <target> <options>
for conf in $configs ; do
target=$(echo $conf | cut -d'+' -f1)
+ # reload config with DPDK_TARGET set
+ DPDK_TARGET=$target
+ reset_env
+ . $(dirname $(readlink -e $0))/load-devel-config.sh
+
options=$(echo $conf | cut -d'+' -sf2- --output-delimiter='-')
if [ -z "$options" ] ; then
dir=$target
--
2.7.0
next prev parent reply other threads:[~2016-03-29 16:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 16:15 [dpdk-dev] [PATCH 0/8] simpler and better build test Thomas Monjalon
2016-03-29 16:15 ` [dpdk-dev] [PATCH 1/8] scripts: fix run in any directory Thomas Monjalon
2016-03-29 16:15 ` [dpdk-dev] [PATCH 2/8] scripts: remove legacy build method test Thomas Monjalon
2016-03-29 16:15 ` [dpdk-dev] [PATCH 3/8] scripts: test build of performance-thread example Thomas Monjalon
2016-03-29 16:15 ` [dpdk-dev] [PATCH 4/8] scripts: stop build test after first error Thomas Monjalon
2016-03-29 16:15 ` Thomas Monjalon [this message]
2016-03-29 16:15 ` [dpdk-dev] [PATCH 6/8] scripts: allow tuning any test build option Thomas Monjalon
2016-03-29 16:15 ` [dpdk-dev] [PATCH 7/8] scripts: hook build test config Thomas Monjalon
2016-03-29 16:15 ` [dpdk-dev] [PATCH 8/8] scripts: add verbose test build option Thomas Monjalon
2016-04-07 21:08 ` [dpdk-dev] [PATCH 0/8] simpler and better build test Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1459268154-29558-6-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).