diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2018-04-17 19:44:58 +0300 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2018-04-17 19:44:58 +0300 |
commit | 539c27970d52d537b1c52c912f83840371ac8bdf (patch) | |
tree | 5248de9ba8cbd00e7aab1ee45d43bcf6b8dc426d | |
parent | 42bef28977ff5499d5e364fa531d4b0e6e344823 (diff) |
testijng code for building dpdk on all archs
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r-- | execs/dpdk_all_archs.yaml | 18 | ||||
-rw-r--r-- | multinodes/testing.yaml | 6 | ||||
-rwxr-xr-x | scripts/build-dpdk.sh | 40 |
3 files changed, 64 insertions, 0 deletions
diff --git a/execs/dpdk_all_archs.yaml b/execs/dpdk_all_archs.yaml new file mode 100644 index 0000000..253355b --- /dev/null +++ b/execs/dpdk_all_archs.yaml @@ -0,0 +1,18 @@ +metadata: + name: Build DPDK + format: "Lava-Test-Shell Test Definition 1.0" + description: "Build DPDK" + version: 1.0 + +params: + +install: + deps: + - libnuma1 + - libnuma-dev + - libpcap-dev + +run: + steps: + - echo "Build DPDK" + - $(./scripts/build-dpdk.sh) diff --git a/multinodes/testing.yaml b/multinodes/testing.yaml index 787d107..1115c76 100644 --- a/multinodes/testing.yaml +++ b/multinodes/testing.yaml @@ -116,6 +116,12 @@ actions: from: git path: execs/ubuntu-build-essential.yaml name: ubuntu-build-essential + + - repository: https://git.linaro.org/people/ilias.apalodimas/lava-sessions.git/ + from: git + path: execs/dpdk_all_archs.yaml + name: dpdk-build + - repository: https://git.linaro.org/lava-team/hacking-session.git from: git diff --git a/scripts/build-dpdk.sh b/scripts/build-dpdk.sh new file mode 100755 index 0000000..a77159a --- /dev/null +++ b/scripts/build-dpdk.sh @@ -0,0 +1,40 @@ +#!/bin/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' ] && stop_hacking && 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" + +# terminate LAVA job if download failed +[ $? -ne 0 ] && dpdk_lava_result DPDK_DOWNLOAD FAILED yes + +# we usually run on Xeon/Thunderx, aadjust accordingly for future archs +case $arch in + aarch64) + dpdk_t='arm64-armv8a-linuxapp-gcc' + cjobs=98 + ;; + x86_64) + dpdk_t='x86_64-native-linuxapp-gcc' + cjobs=24 + ;; + *) + dpdk_lava_result BUILD_ARCH UNKNOWN_ARCH yes +esac + +cd "$DPDK_DIR" +make -j "$cjobs" install T="$dpdk_t" DESTDIR=./install +cd .. |