summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2018-04-19 09:31:41 +0300
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2018-04-19 09:31:41 +0300
commit34a4d567042bf71c6d29d94e40e65365ddca0b68 (patch)
tree6718c8f0574a9b3d52ac3c32c6ab5ec59db28672 /scripts
parentbcc006618a5416c81cf29878174a8d1db84cd13e (diff)
updated testing to build odp
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-dpdk.sh12
-rwxr-xr-xscripts/build-odp.sh27
-rwxr-xr-xscripts/lava-common.sh10
3 files changed, 40 insertions, 9 deletions
diff --git a/scripts/build-dpdk.sh b/scripts/build-dpdk.sh
index ca8c626..2702402 100755
--- a/scripts/build-dpdk.sh
+++ b/scripts/build-dpdk.sh
@@ -1,20 +1,13 @@
#!/bin/sh
+. ./lava-comon.sh
+
DPDK_VER='17.11.1'
DPDK_DIR='dpdk_source'
DPDK_STATIC_TAR='dpdk.tar.xz'
arch=$(arch)
-dpdk_lava_result() {
- reason=$1
- result=$2
- stop_session=$3
-
- lava-test-case "$reason" --result "$result"
- [ "$stop_session" = 'yes' ] && lava-test-raise "$reason" && exit 1
-}
-
wget https://fast.dpdk.org/rel/dpdk-"$DPDK_VER".tar.xz -O "$DPDK_STATIC_TAR" && \
mkdir "$DPDK_DIR" && tar xf "$DPDK_STATIC_TAR" --strip 1 -C "$DPDK_DIR"
@@ -38,3 +31,4 @@ esac
cd "$DPDK_DIR"
make -j "$cjobs" install T="$dpdk_t" DESTDIR=./install
cd ..
+dpdk_lava_result 'DPDK_BUILD' 'OK' 'no'
diff --git a/scripts/build-odp.sh b/scripts/build-odp.sh
new file mode 100755
index 0000000..ecaa636
--- /dev/null
+++ b/scripts/build-odp.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+ODP_VER='master'
+ODP_CONF_OPTS='--enable-debug --enable-debug-print --prefix=./install'
+
+git clone https://github.com/Linaro/odp.git && cd odp && git checkout master
+# terminate LAVA job if download failed
+[ $? -ne 0 ] && dpdk_lava_result 'ODP_DOWNLOAD' 'FAILED' 'yes'
+
+# we usually run on Xeon/Thunderx, aadjust accordingly for future archs
+arch=$(arch)
+case $arch in
+ aarch64)
+ cjobs=98
+ ;;
+ x86_64)
+ cjobs=24
+ ;;
+ *)
+ dpdk_lava_result 'BUILD_ARCH' 'UNKNOWN_ARCH' 'yes'
+esac
+
+# already cd'ed in
+./bootstrap
+autoreconf -i
+./configure --enable-debug --enable-debug-print --prefix=$BUILD_DIR
+make -j $cjobs install
diff --git a/scripts/lava-common.sh b/scripts/lava-common.sh
new file mode 100755
index 0000000..331db0f
--- /dev/null
+++ b/scripts/lava-common.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+dpdk_lava_result() {
+ reason=$1
+ result=$2
+ stop_session=$3
+
+ lava-test-case "$reason" --result "$result"
+ [ "$stop_session" = 'yes' ] && lava-test-raise "$reason" && exit 1
+}