aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Maiocchi <dmaiocchi@suse.com>2017-11-11 13:16:03 +0100
committerDario Maiocchi <dmaiocchi@suse.com>2017-11-13 18:15:49 +0100
commit3b93268d4b2ea1e98263b0329a3b21bed5a03ef1 (patch)
tree86bb311ca03679f725945bc36431171b45b76f08
parent6cca5196b383ecfbdf1162e1c3965f610bb3a95e (diff)
downloadterraform-provider-libvirt-3b93268d4b2ea1e98263b0329a3b21bed5a03ef1.tar
terraform-provider-libvirt-3b93268d4b2ea1e98263b0329a3b21bed5a03ef1.tar.gz
Add more doc about the Makefile workflow(suggested)
-rw-r--r--Makefile (renamed from GNUmakefile)9
-rw-r--r--doc/CONTRIBUTING.md19
-rwxr-xr-xtravis/run_acceptance_test.sh (renamed from tests/run_acceptance_test.sh)0
3 files changed, 21 insertions, 7 deletions
diff --git a/GNUmakefile b/Makefile
index f5c3f4e2..a2adfead 100644
--- a/GNUmakefile
+++ b/Makefile
@@ -1,10 +1,13 @@
default: build
build: gofmtcheck
+ go build
+
+install: build
go install
-testacc: build
- bash tests/run_acceptance_test.sh
+test: install
+ bash travis/run_acceptance_test.sh
vet:
@echo "go vet ."
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
@@ -19,4 +22,4 @@ golint:
gofmtcheck:
bash travis/gofmtcheck.sh
-.PHONY: build testacc vet fmt golint
+.PHONY: build install test vet fmt golint
diff --git a/doc/CONTRIBUTING.md b/doc/CONTRIBUTING.md
index bbdfe7af..6fbcf4c8 100644
--- a/doc/CONTRIBUTING.md
+++ b/doc/CONTRIBUTING.md
@@ -5,15 +5,26 @@ Look at open issues, especially with label:
- [junior job](https://github.com/dmacvicar/terraform-provider-libvirt/issues?q=is%3Aissue+is%3Aopen+label%3A%22junior+job%22),
- [help wanted](https://github.com/dmacvicar/terraform-provider-libvirt/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)
+### Makefile devel workflow.
+
+Go in your build dir ```cd $GOPATH/src/github.com/dmacvicar/terraform-provider-libvirt```,
+then use
+
+```console
+make test
+```
+
# Contribute
-1. [Build the plugin from source](https://github.com/dmacvicar/terraform-provider-libvirt#building-from-source)
-2. If you have issues, check out the [troubleshooting](https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/doc/TROUBLESHOOTING.md)
-3. Do your code (reference issue on your pr if you fix them) [Closing issues keywords](https://help.github.com/articles/closing-issues-using-keywords/)
-4. Run the acceptance tests.
+1. If you have issues, check out the [troubleshooting](https://github.com/dmacvicar/terraform-provider-libvirt/blob/master/doc/TROUBLESHOOTING.md)
+2. Do your code (reference issue on your pr if you fix them) [Closing issues keywords](https://help.github.com/articles/closing-issues-using-keywords/)
+3. Use the Makefile workflow before submit the PR (building, tests).
+4. Test your code by running the acceptance tests ```make test```
+5. Create a PR
## Writing acceptance tests.
+Look at
https://github.com/hashicorp/terraform/blob/master/.github/CONTRIBUTING.md#running-an-acceptance-test
## Running acceptance tests
diff --git a/tests/run_acceptance_test.sh b/travis/run_acceptance_test.sh
index 5010505a..5010505a 100755
--- a/tests/run_acceptance_test.sh
+++ b/travis/run_acceptance_test.sh