소스 검색

after the changes to unit test framework, fixing gccgo to run unit tests
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>

Srini Brahmaroutu 9 년 전
부모
커밋
81b3d2eec9
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      hack/make/test-unit

+ 6 - 1
hack/make/test-unit

@@ -21,7 +21,12 @@ bundle_test_unit() {
 		"${BUILDFLAGS[@]}" $TEST_PATH \
 		| grep -v github.com/docker/docker/vendor \
 		| grep -v github.com/docker/docker/integration-cli)
-	go test -cover $GCCGOFLAGS -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
+	go test $COVER $GCCGOFLAGS -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS $pkg_list
 }
 
+if [[ "$(go version)" =~ "gccgo" ]]; then
+	GCCGOFLAGS=-gccgoflags="-lpthread"
+else
+	COVER=-cover
+fi
 bundle_test_unit 2>&1 | tee -a "$DEST/test.log"