From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id D21295680 for ; Tue, 29 Mar 2016 18:18:09 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id p65so34108534wmp.0 for ; Tue, 29 Mar 2016 09:18:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=801G7+mDifyVXCiCqFsS/0tUgIHcvykprUtajFrqn5g=; b=x4K+ytWYQQeL82Xcylf/eKbK+VT/86S6y+pVB7Qa5czpXmuVkIO5uXVWbX6v8fhMxm u9mvZWx4e7AylKqiVpZYTquxdE7zKb8yFdJok56g4QHO7IyzC0anJa+TaL/Tg859R533 kgUOhFHOtn4U9a0fdEjFGCAzpZp3pyT/ImOVMLMGc8s9Z2VHGiGTxzLE9wu5oArZV5im 2UfAcAY3mQ5+7KYPVn3TBKcjsB2AyoBU+9IF1mP/YZDQhDUpq64pCukQyYLgAqSrr8gu nq9IZCbK8qiOT44BLdf6HxjsGyuiQ3gbwpiD9b6tZWLNp5GzJoGsgkcldOVik/twqL9X FzPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=801G7+mDifyVXCiCqFsS/0tUgIHcvykprUtajFrqn5g=; b=ldPjucmxLkq+/JKxfmnLWJkWtlvVInC8elwRiiE7i6gLE0g8pHPMvFMnzAjSuYQMwp 1zP+Sy0MzEJUjkqKljtWXie3PJeu+CriwkkqrvynKS16Bi134O/Sd//T4wqFctXdQBXT s+xHqjI1T1+oaeZAfBs42OQhtCz8fC3e3DKDifTNyKNlW4JOPx3D5xWA/rR5abKO8qHE cZB7zvpuhoZOfVTM792AHZJ9hYPbzpSU6DWBvFbOLpbcS7HAP9UemLUkg7j7wUBre8uJ rKlXrbjKMyexulLnWLPtJqeAep85Vh6kl/FOXOrQ5uy3CvuJ27QpmWuGCcQJX+/m3tmi ioNg== X-Gm-Message-State: AD7BkJLSLM3aEBnXXQC6IpV9fjqo49y3jGQkdrcW0QQu1fIluF+MZtbGEY6i/hyXlbgL/IO4 X-Received: by 10.194.47.237 with SMTP id g13mr3686195wjn.142.1459268289743; Tue, 29 Mar 2016 09:18:09 -0700 (PDT) Received: from XPS13.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id jf6sm30004635wjb.2.2016.03.29.09.18.08 for (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2016 09:18:09 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Tue, 29 Mar 2016 18:15:51 +0200 Message-Id: <1459268154-29558-6-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1459268154-29558-1-git-send-email-thomas.monjalon@6wind.com> References: <1459268154-29558-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH 5/8] scripts: allow tuning build options per test target X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 16:18:10 -0000 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 --- 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 () # { if [ ! -e $1/.config ] ; then @@ -103,16 +124,14 @@ config () # 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 () # 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 () # 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