Closes https://github.com/ooni/probe/issues/2334. While there, reinstate integration tests, which were also lost in a previous refactoring. However, only run those tests for linux/amd64 because we can be confident that the Go compiler is WAI for all archs we support. While there, always use bash for running end-to-end tests. H/T @ainghazal for discovering and reporting this bug.
		
			
				
	
	
		
			19 lines
		
	
	
		
			527 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			527 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| set -euxo pipefail
 | |
| # Some of the following exports are redundant but are however
 | |
| # useful because they provide explicit logging
 | |
| export CGO_ENABLED=1
 | |
| export GOARM=$GOARM
 | |
| export GOCACHE=$GOCACHE
 | |
| export GOMODCACHE=$GOMODCACHE
 | |
| export GOOS=$GOOS
 | |
| export GOARCH=$GOARCH
 | |
| export OONI_PSIPHON_TAGS=${OONI_PSIPHON_TAGS:-}
 | |
| for PACKAGE in $@; do
 | |
| 	PRODUCT=$(basename $PACKAGE)
 | |
| 	go build -o ./CLI/$PRODUCT-$GOOS-$OONIARCH \
 | |
| 		-tags=$OONI_PSIPHON_TAGS \
 | |
| 		-ldflags='-s -w -extldflags "-static"' \
 | |
| 		$GOLANG_EXTRA_FLAGS $PACKAGE
 | |
| done
 |