Skip to content

Commit 71b4f30

Browse files
committed
Add Makefile option to run unit tests only
1 parent a556e55 commit 71b4f30

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,24 @@ zip:
3232
tar -czvf solaris_amd64.tar.gz solaris_amd64
3333

3434
### `make test run=TestResourceCore debug=1`
35-
cmd := TF_ACC=1 TF_ORACLE_ENV=test go test ./provider -v -timeout 120m
35+
basecmd := TF_ORACLE_ENV=test go test ./provider -v -timeout 120m
36+
37+
### Run all tests by default. Omit acceptance tests if unit tests are specified (e.g. `make test mode=unit`)
38+
cmd := TF_ACC=1 $(basecmd)
39+
ifdef mode
40+
ifeq ($(mode),unit)
41+
cmd := $(basecmd)
42+
endif
43+
endif
44+
3645
ifdef run
3746
cmd := $(cmd) -run $(run)
3847
endif
48+
3949
ifdef debug
4050
cmd := DEBUG=true TF_LOG=DEBUG OCI_GO_SDK_DEBUG=1 $(cmd)
4151
endif
52+
4253
test: ;$(cmd)
4354

4455
test_print:

0 commit comments

Comments
 (0)