aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xextras/hs-test/script/build.sh11
-rw-r--r--extras/hs-test/vars2
2 files changed, 12 insertions, 1 deletions
diff --git a/extras/hs-test/script/build.sh b/extras/hs-test/script/build.sh
index dd6f9c02575..9860ba231b7 100755
--- a/extras/hs-test/script/build.sh
+++ b/extras/hs-test/script/build.sh
@@ -1,5 +1,10 @@
#!/usr/bin/env bash
+if [ $(lsb_release -is) != Ubuntu ]; then
+ echo "Host stack test framework is supported only on Ubuntu"
+ exit 1
+fi
+
source vars
bin=vpp-data/bin
@@ -8,7 +13,13 @@ lib=vpp-data/lib
mkdir -p ${bin} ${lib} || true
cp ${VPP_WS}/build-root/build-vpp_debug-native/vpp/bin/* ${bin}
+res+=$?
cp -r ${VPP_WS}/build-root/build-vpp_debug-native/vpp/lib/x86_64-linux-gnu/* ${lib}
+res+=$?
+if [ $res -ne 0 ]; then
+ echo "Failed to copy VPP files. Is VPP built? Try running 'make build' in VPP directory."
+ exit 1
+fi
docker build --build-arg UBUNTU_VERSION -t hs-test/vpp -f docker/Dockerfile.vpp .
docker build --build-arg UBUNTU_VERSION -t hs-test/nginx-ldp -f docker/Dockerfile.nginx .
diff --git a/extras/hs-test/vars b/extras/hs-test/vars
index b48793bcc29..3879d5799f2 100644
--- a/extras/hs-test/vars
+++ b/extras/hs-test/vars
@@ -3,4 +3,4 @@ export VPP_WS=../../
export HST_LDPRELOAD=${VPP_WS}/build-root/build-vpp_debug-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so
export PATH=${VPP_WS}/build-root/build-vpp_debug-native/vpp/bin:$PATH
-export UBUNTU_VERSION=22.04
+export UBUNTU_VERSION=$(lsb_release -rs)