... | ... |
@@ -8,14 +8,10 @@ env: |
8 | 8 |
- TEST_ASSETS=false |
9 | 9 |
|
10 | 10 |
install: |
11 |
- - ./hack/verify-jsonformat.sh |
|
12 |
- - ./hack/install-etcd.sh |
|
13 |
- - ./hack/install-std-race.sh |
|
14 |
- - ./hack/install-tools.sh |
|
15 |
- - ./hack/build-go.sh |
|
16 |
- - ./hack/install-assets.sh |
|
11 |
+ - PATH=$HOME/gopath/bin:$PATH make install-travis |
|
17 | 12 |
|
18 |
-script: ./hack/test-assets.sh && export TRAVIS_TEST=true && PATH=$HOME/gopath/bin:./_output/etcd/bin:$PATH make check-test WHAT="''" TESTFLAGS="-p=4" |
|
13 |
+script: |
|
14 |
+ - make check-test TESTFLAGS="-p=4" TESTS="''" # empty quotes are because hack/test-go.sh requires 2 args |
|
19 | 15 |
|
20 | 16 |
notifications: |
21 | 17 |
irc: "chat.freenode.net#openshift-dev" |
... | ... |
@@ -47,16 +47,35 @@ check: |
47 | 47 |
TEST_KUBE=1 hack/test-go.sh $(WHAT) $(TESTS) $(TESTFLAGS) |
48 | 48 |
.PHONY: check |
49 | 49 |
|
50 |
+# Install travis dependencies |
|
51 |
+# |
|
52 |
+# Args: |
|
53 |
+# TEST_ASSETS: Instead of running tests, test assets only. |
|
54 |
+ifeq ($(TEST_ASSETS), true) |
|
55 |
+install-travis: |
|
56 |
+ hack/install-assets.sh |
|
57 |
+else |
|
58 |
+install-travis: |
|
59 |
+ hack/install-etcd.sh |
|
60 |
+ hack/install-tools.sh |
|
61 |
+endif |
|
62 |
+.PHONY: install-travis |
|
63 |
+ |
|
50 | 64 |
# Build and run unit and integration tests that don't require Docker. |
51 | 65 |
# |
52 | 66 |
# Args: |
53 | 67 |
# GOFLAGS: Extra flags to pass to 'go' when building. |
54 | 68 |
# TESTFLAGS: Extra flags that should only be passed to hack/test-go.sh |
69 |
+# TEST_ASSETS: Instead of running tests, test assets only. |
|
55 | 70 |
# |
56 | 71 |
# Example: |
57 | 72 |
# make check-test |
58 | 73 |
check-test: export KUBE_COVER= -cover -covermode=atomic |
59 | 74 |
check-test: export KUBE_RACE= -race |
75 |
+ifeq ($(TEST_ASSETS), true) |
|
76 |
+check-test: |
|
77 |
+ hack/test-assets.sh |
|
78 |
+else |
|
60 | 79 |
check-test: build check |
61 | 80 |
check-test: |
62 | 81 |
hack/verify-gofmt.sh |
... | ... |
@@ -69,6 +88,7 @@ check-test: |
69 | 69 |
hack/verify-api-descriptions.sh |
70 | 70 |
hack/test-cmd.sh |
71 | 71 |
KUBE_RACE=" " hack/test-integration.sh |
72 |
+endif |
|
72 | 73 |
.PHONY: check-test |
73 | 74 |
|
74 | 75 |
# Build and run the complete test-suite. |