[lxc-devel] [lxd/master] tests: Validate that the right busybox is present
stgraber on Github
lxc-bot at linuxcontainers.org
Thu Jul 6 22:15:52 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170706/ab7d3f20/attachment.bin>
-------------- next part --------------
From a7da510269cb3161746454f3ff0519a6366933f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 6 Jul 2017 18:15:29 -0400
Subject: [PATCH] tests: Validate that the right busybox is present
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
test/main.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/test/main.sh b/test/main.sh
index 740dc18fc..396d7b7f0 100755
--- a/test/main.sh
+++ b/test/main.sh
@@ -261,6 +261,16 @@ ensure_import_testimage() {
if [ -e "${LXD_TEST_IMAGE:-}" ]; then
lxc image import "${LXD_TEST_IMAGE}" --alias testimage
else
+ if [ ! -e "/bin/busybox" ]; then
+ echo "Please install busybox (busybox-static) or set LXD_TEST_IMAGE"
+ exit 1
+ fi
+
+ if ldd /bin/busybox >/dev/null 2>&1; then
+ echo "The testsuite requires /bin/busybox to be a static binary"
+ exit 1
+ fi
+
deps/import-busybox --alias testimage
fi
fi
More information about the lxc-devel
mailing list