about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2017-10-06T12·58+0200
committerGitHub <noreply@github.com>2017-10-06T12·58+0200
commitb2e00fd5b75e055832ff6dff97fb4fd016ba5d6f (patch)
tree64222f8c10fe57eb9b25a334ebc2250fcaa8cfa3
parentc6676ea253e6402760435b1a3cff53d294e4a9fd (diff)
parente94fc238cf87b90547803d29b04f55e0bb211daa (diff)
Merge pull request #1593 from Mic92/bashism
fixing bashisms in test code
-rw-r--r--mk/tests.mk7
-rw-r--r--release.nix2
2 files changed, 4 insertions, 5 deletions
diff --git a/mk/tests.mk b/mk/tests.mk
index aa97d6427ccc..d18b910584f4 100644
--- a/mk/tests.mk
+++ b/mk/tests.mk
@@ -10,13 +10,12 @@ endef
 # Color code from https://unix.stackexchange.com/a/10065
 installcheck:
 	@total=0; failed=0; \
-	pad="                           "; \
 	red=""; \
 	green=""; \
 	normal=""; \
 	if [ -t 1 ]; then \
 		ncolors="$$(tput colors)"; \
-		if [[ -n "$$ncolors" && $$ncolors -ge 8 ]]; then \
+		if [ -n "$$ncolors" ] && [ "$$ncolors" -ge 8 ]; then \
 			red="$$(tput setaf 1)"; \
 			green="$$(tput setaf 2)"; \
 			normal="$$(tput sgr0)"; \
@@ -24,9 +23,9 @@ installcheck:
 	fi; \
 	for i in $(_installcheck-list); do \
 	  total=$$((total + 1)); \
-	  printf "running test $$i... $${pad:$${#i}}"; \
+	  printf "running test $$i..."; \
 	  log="$$(cd $$(dirname $$i) && $(tests-environment) $$(basename $$i) 2>&1)"; \
-	  if [ $$? == 0 ]; then \
+	  if [ $$? -eq 0 ]; then \
 	    echo "[$${green}PASS$$normal]"; \
 	  else \
 	    echo "[$${red}FAIL$$normal]"; \
diff --git a/release.nix b/release.nix
index 29cd36860ad4..a98199258842 100644
--- a/release.nix
+++ b/release.nix
@@ -332,7 +332,7 @@ let
       src = jobs.tarball;
       diskImage = (diskImageFun vmTools.diskImageFuns)
         { extraPackages =
-            [ "libsqlite3-dev" "libbz2-dev" "libcurl-dev" "libcurl3-nss" "libssl-dev" "liblzma-dev" "libseccomp-dev" ]
+            [ "libsqlite3-dev" "libbz2-dev" "libcurl-dev" "libcurl3-nss" "libssl-dev" "liblzma-dev" "libseccomp-dev" "ncurses-bin" ]
             ++ extraPackages; };
       memSize = 1024;
       meta.schedulingPriority = 50;