Skip to content

Commit

Permalink
fixing bashisms in test code
Browse files Browse the repository at this point in the history
This fixed the build on ubuntu/debian, where dash is the sh.
  • Loading branch information
Mic92 committed Oct 6, 2017
1 parent c6676ea commit e94fc23
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions mk/tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@ 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)"; \
fi; \
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]"; \
Expand Down
2 changes: 1 addition & 1 deletion release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e94fc23

Please sign in to comment.