From 189785a4ccf41dce4d9351b12e33e64ffe134d14 Mon Sep 17 00:00:00 2001 From: Nicolas PLANEL Date: Tue, 25 Jul 2017 17:35:37 +1000 Subject: [PATCH] contributing : making changes Signed-off-by: Nicolas PLANEL --- CONTRIBUTING.md | 21 +++++++++++++++++++++ Makefile | 13 ++++++++----- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d96f0351f3..1db810bfed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,6 +4,27 @@ Contributing to Skydive Your contributions are more than welcome. Please read the following notes to know about the process. +Making Changes: +--------------- + +Before pushing your changes, please make sure the tests and the linters pass: + +* make fmt +* make test +* make functional + +_Please note, make functional will create local network resources +(bridges, namespaces, ...)_ + +Once ready push your changes to your Skydive fork our CI will check your +pull request. + +We're much more likely to approve your changes if you: + +* Add tests for new functionality. +* Write a good commit message, please see how to write below. +* Maintain backward compatibility. + How To Submit Code ------------------ diff --git a/Makefile b/Makefile index 34cca3c7b0..38a8b155f9 100644 --- a/Makefile +++ b/Makefile @@ -68,20 +68,23 @@ else endif test.functionals.all: test.functionals.compile - make TIMEOUT="8m" ARGS=${ARGS} test.functionals.run + $(MAKE) TIMEOUT="8m" ARGS=${ARGS} test.functionals.run test.functionals.batch: test.functionals.compile ifneq ($(TEST_PATTERN),) - set -e ; make ARGS="${ARGS} -test.run ${TEST_PATTERN}" test.functionals.run + set -e ; $(MAKE) ARGS="${ARGS} -test.run ${TEST_PATTERN}" test.functionals.run else - set -e ; make ARGS="${ARGS}" test.functionals.run + set -e ; $(MAKE) ARGS="${ARGS}" test.functionals.run endif test.functionals: test.functionals.compile for functest in ${FUNC_TESTS} ; do \ - make ARGS="-test.run $$functest$$\$$ ${ARGS} ${COVERAGE_ARGS}" test.functionals.run; \ + $(MAKE) ARGS="-test.run $$functest$$\$$ ${ARGS} ${COVERAGE_ARGS}" test.functionals.run; \ done +functional: + $(MAKE) test.functionals VERBOSE=true TIMEOUT=10m ARGS='-standalone' + test: govendor genlocalfiles ifeq ($(COVERAGE), true) set -v ; \ @@ -170,7 +173,7 @@ dist: export GOPATH=$$godir; \ cd $$skydivedir; \ echo "go take a coffee, govendor sync takes time ..."; \ - make govendor genlocalfiles; \ + $(MAKE) govendor genlocalfiles; \ popd; \ tar -C $$tmpdir --exclude=skydive-${VERSION}/src/github.com/skydive-project/skydive/.git -cvzf ${DESTDIR}/skydive-${VERSION}.tar.gz skydive-${VERSION}/src; \ rm -rf $$tmpdir