Browse Source

Kill all concurrent jobs on error

Docker-DCO-1.1-Signed-off-by: Tibor Vass <teabee89@gmail.com> (github: tiborvass)
Tibor Vass 11 years ago
parent
commit
4cfe806db2
2 changed files with 2 additions and 1 deletions
  1. 1 0
      hack/make.sh
  2. 1 1
      hack/make/test-unit

+ 1 - 0
hack/make.sh

@@ -175,6 +175,7 @@ go_compile_test_dir() {
 		cd "$dir"
 		cd "$dir"
 		go test "${testcover[@]}" -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS -c
 		go test "${testcover[@]}" -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS -c
 	)
 	)
+	[ $? -ne 0 ] && return 1
 	mkdir -p "$(dirname "$out_file")"
 	mkdir -p "$(dirname "$out_file")"
 	mv "$dir/$(basename "$dir").test" "$out_file"
 	mv "$dir/$(basename "$dir").test" "$out_file"
 	echo "Precompiled: github.com/dotcloud/docker${dir#.}"
 	echo "Precompiled: github.com/dotcloud/docker${dir#.}"

+ 1 - 1
hack/make/test-unit

@@ -38,7 +38,7 @@ bundle_test_unit() {
 			export BUILDFLAGS_FILE="$HOME/buildflags_file"
 			export BUILDFLAGS_FILE="$HOME/buildflags_file"
 			( IFS=$'\n'; echo "${BUILDFLAGS[*]}" ) > "$BUILDFLAGS_FILE"
 			( IFS=$'\n'; echo "${BUILDFLAGS[*]}" ) > "$BUILDFLAGS_FILE"
 
 
-			echo "$TESTDIRS" | parallel --jobs "$PARALLEL_JOBS" --env _ go_compile_test_dir
+			echo "$TESTDIRS" | parallel --jobs "$PARALLEL_JOBS" --halt 2 --env _ go_compile_test_dir
 			rm -rf "$HOME"
 			rm -rf "$HOME"
 		) else
 		) else
 			# aww, no "parallel" available - fall back to boring
 			# aww, no "parallel" available - fall back to boring