mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	"set -e" is already inherited here from make.sh, but explicit is always better than implicit (hence the "set -e" in the first place!) Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			398 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			398 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/bin/bash
 | 
						|
set -e
 | 
						|
 | 
						|
DEST="$1"
 | 
						|
 | 
						|
bundle_cover() {
 | 
						|
	coverprofiles=( "$DEST/../"*"/coverprofiles/"* )
 | 
						|
	for p in "${coverprofiles[@]}"; do
 | 
						|
		echo
 | 
						|
		(
 | 
						|
			set -x
 | 
						|
			go tool cover -func="$p"
 | 
						|
		)
 | 
						|
	done
 | 
						|
}
 | 
						|
 | 
						|
if [ "$HAVE_GO_TEST_COVER" ]; then
 | 
						|
	bundle_cover 2>&1 | tee "$DEST/report.log"
 | 
						|
else
 | 
						|
	echo >&2 'warning: the current version of go does not support -cover'
 | 
						|
	echo >&2 '  skipping test coverage report'
 | 
						|
fi
 |