X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=devtools%2Ftest-build.sh;h=52305fbb8caac145f5f908c9ef665901bab3f906;hb=72c4b592aba57f84add9ef5334ebe78092b8cac1;hp=2bedbdb9803d96ce9ae6690e751214728383f144;hpb=be7e90917e481ce593ef7b44bc2043ddc861ac9c;p=dpdk.git diff --git a/devtools/test-build.sh b/devtools/test-build.sh index 2bedbdb980..52305fbb8c 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 @@ -147,7 +149,7 @@ config () # ! echo $3 | grep -q '+debug' || ( \ sed -ri="" 's,(RTE_LOG_DP_LEVEL=).*,\1RTE_LOG_DEBUG,' $1/.config sed -ri="" 's,(_DEBUG.*=)n,\1y,' $1/.config - sed -ri="" 's,(_STAT.*=)n,\1y,' $1/.config + sed -ri="" 's,(_STAT)([S_].*=|=)n,\1\2y,' $1/.config sed -ri="" 's,(TEST_PMD_RECORD_.*=)n,\1y,' $1/.config ) # Automatic configuration @@ -234,21 +236,24 @@ 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" + echo "================== Build $conf" ${MAKE} -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \ EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir ! $short || break - echo "================== Build examples for $dir" - export RTE_SDK=$(pwd) - export RTE_TARGET=$dir + export RTE_TARGET=$target + rm -rf $dir/install + ${MAKE} install O=$dir DESTDIR=$dir/install prefix= + echo "================== Build examples for $conf" + export RTE_SDK=$(readlink -f $dir)/install/share/dpdk + ln -sTf $(pwd)/lib $RTE_SDK/lib # workaround for vm_power_manager ${MAKE} -j$J -sC examples \ EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose \ O=$(readlink -f $dir)/examples unset RTE_TARGET - echo "################## $dir done." + echo "################## $conf done." unset dir done