Merge pull request #1593 from Mic92/bashism
fixing bashisms in test code
This commit is contained in:
		
						commit
						b2e00fd5b7
					
				
					 2 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
					@ -10,13 +10,12 @@ endef
 | 
				
			||||||
# Color code from https://unix.stackexchange.com/a/10065
 | 
					# Color code from https://unix.stackexchange.com/a/10065
 | 
				
			||||||
installcheck:
 | 
					installcheck:
 | 
				
			||||||
	@total=0; failed=0; \
 | 
						@total=0; failed=0; \
 | 
				
			||||||
	pad="                           "; \
 | 
					 | 
				
			||||||
	red=""; \
 | 
						red=""; \
 | 
				
			||||||
	green=""; \
 | 
						green=""; \
 | 
				
			||||||
	normal=""; \
 | 
						normal=""; \
 | 
				
			||||||
	if [ -t 1 ]; then \
 | 
						if [ -t 1 ]; then \
 | 
				
			||||||
		ncolors="$$(tput colors)"; \
 | 
							ncolors="$$(tput colors)"; \
 | 
				
			||||||
		if [[ -n "$$ncolors" && $$ncolors -ge 8 ]]; then \
 | 
							if [ -n "$$ncolors" ] && [ "$$ncolors" -ge 8 ]; then \
 | 
				
			||||||
			red="$$(tput setaf 1)"; \
 | 
								red="$$(tput setaf 1)"; \
 | 
				
			||||||
			green="$$(tput setaf 2)"; \
 | 
								green="$$(tput setaf 2)"; \
 | 
				
			||||||
			normal="$$(tput sgr0)"; \
 | 
								normal="$$(tput sgr0)"; \
 | 
				
			||||||
| 
						 | 
					@ -24,9 +23,9 @@ installcheck:
 | 
				
			||||||
	fi; \
 | 
						fi; \
 | 
				
			||||||
	for i in $(_installcheck-list); do \
 | 
						for i in $(_installcheck-list); do \
 | 
				
			||||||
	  total=$$((total + 1)); \
 | 
						  total=$$((total + 1)); \
 | 
				
			||||||
	  printf "running test $$i... $${pad:$${#i}}"; \
 | 
						  printf "running test $$i..."; \
 | 
				
			||||||
	  log="$$(cd $$(dirname $$i) && $(tests-environment) $$(basename $$i) 2>&1)"; \
 | 
						  log="$$(cd $$(dirname $$i) && $(tests-environment) $$(basename $$i) 2>&1)"; \
 | 
				
			||||||
	  if [ $$? == 0 ]; then \
 | 
						  if [ $$? -eq 0 ]; then \
 | 
				
			||||||
	    echo "[$${green}PASS$$normal]"; \
 | 
						    echo "[$${green}PASS$$normal]"; \
 | 
				
			||||||
	  else \
 | 
						  else \
 | 
				
			||||||
	    echo "[$${red}FAIL$$normal]"; \
 | 
						    echo "[$${red}FAIL$$normal]"; \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -332,7 +332,7 @@ let
 | 
				
			||||||
      src = jobs.tarball;
 | 
					      src = jobs.tarball;
 | 
				
			||||||
      diskImage = (diskImageFun vmTools.diskImageFuns)
 | 
					      diskImage = (diskImageFun vmTools.diskImageFuns)
 | 
				
			||||||
        { extraPackages =
 | 
					        { 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; };
 | 
					            ++ extraPackages; };
 | 
				
			||||||
      memSize = 1024;
 | 
					      memSize = 1024;
 | 
				
			||||||
      meta.schedulingPriority = 50;
 | 
					      meta.schedulingPriority = 50;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue