[lxc-devel] [lxd/master] tests: Fix dependency check

stgraber on Github lxc-bot at linuxcontainers.org
Thu Sep 28 13:10:44 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/20170928/fde28ebc/attachment.bin>
-------------- next part --------------
From af0d45f396b721d6a2d338dd24591ac31a29fd48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Thu, 28 Sep 2017 09:10:17 -0400
Subject: [PATCH] tests: Fix dependency check
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/suites/static_analysis.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/suites/static_analysis.sh b/test/suites/static_analysis.sh
index a3fc5dae2..9cea84ceb 100644
--- a/test/suites/static_analysis.sh
+++ b/test/suites/static_analysis.sh
@@ -65,10 +65,11 @@ test_static_analysis() {
     fi
 
     if which godeps >/dev/null 2>&1; then
-      OUT=$(godeps . ./shared | cut -f1)
-      if [ "${OUT}" != "$(printf "github.com/gorilla/websocket\ngopkg.in/yaml.v2\n")" ]; then
+      OUT=$(godeps -T ./client ./lxc/config ./shared/api 2> /dev/null | grep -v lxc/lxd | grep -v gorilla/websocket | grep -v yaml.v2)
+      if [ -n "${OUT}" ]; then
         echo "ERROR: you added a new dependency to the client or shared; please make sure this is what you want"
         echo "${OUT}"
+        exit 1
       fi
     fi
 


More information about the lxc-devel mailing list