Skip to content
Permalink
Browse files

Disable ginkgo verbose mode (#2145)

* Disable ginkgo verbose mode

* Sync Makefile

* Introduced env var GINKGO_VERBOSE_MODE

* Fix doc indentation

* Remove extra spacing in doc

* Updated .travis.yml

* making GINKGO_VERBOSE_MODE global var in travis.yml

* Fixing rebasing issue
  • Loading branch information...
amitkrout authored and openshift-merge-robot committed Oct 1, 2019
1 parent 92ff854 commit ef844cbf00893ba3eb4b25d3c8c3d9d86dcfe496
@@ -7,6 +7,7 @@ env:
global:
- secure: "SSGPlBUXMb2F3ycFEvRKHoftYy0UkIprwgtfOKXU/Uc359Qct+IrF/b8GuTd64tedXtnQE4z4fxqT8wdYRdNwUysmOvRyzlNTRhs1gocx5iL5El8+7F4we7wElh6ckt2Z5AVI5g0JOwYeQNURFhgDumN14K8XsOu7a2LzRBVFRn55z79xgTL+JnTI89JIWjz1QCr8Z054CMaK0MHJRLkgPnbnx1Skra3Wt16g29wRZLqLWoU8lyrLy9Ao/yHw/AJMCNie8ah7nNiOEdgPTcr/onZ/v+eVyaTvzE9UrmdeqpUpASypAAUnmZ9Q6QsU31dVxwbfPB0r8TzrqinCOYMnHbU/3fIz49Q+yv7RyifYsTlnx7+J79LmCvs7X+iKkmOprWdBRwUUxzDhwgIGnmBlYf0nKj9H2U3XFCYDnbRSI9ZugGBprs3t09w15gwq/wLM6DhY87zNhM4Vfb34ZXVBCEhtUXKUVbVthiPOWlHtbs0YympG/QCV+27tVIszgek8FFt6/fJeEh/APNadK9fuU01ozB01aXj0xMl3PlvoWWeQXDnyttHEWRaiVpbPKGoV5a7LPCVpWk5EOX8YNgHEUnjKwfzVBUriXAd+8zp0sx6TRdt1ts7x04NP1yFF1SCXXBpz/geOsfa2bBQyJx6y7CODcmW7fbcJLxmwdGlm6E="
- secure: "Tr9KxWvfQS6BSF1qUqz1Q41le5k/c+L37Aq8wTPQcmXVu8nLv5T1QMarx64KfZ2qaQBRV+M6DwnJQM7HU/cWX9AKpdoAO2INqANfoFLh8XTR5ncHjaNTzi9aS7owxa+9t0yfKowq7s4dp96nqmwchYFtUxpzKo0TMOcQ1l1AGEu5liniXb9VOKgG8UAZsLgD6b2a80nn6NP1JehGGxcWsow0EzxalnJ8Cv78YTLmqGNowYh5UmkhjkxqE4TskQafRd2qtYMPvxnC2CFd8G3qMlbBzCxM02lGKwbr/Vi41hcSyD3uuyaKVHr/g5qLcp/HNyrUGTREL1UvWkWjlL6ovuh6uHYlnpVwQkX5fzUH7z2hlr9HjQ3Tu6Sbh1CX5QBR5PUkvoOfdx0BHTmTTw2xkvUDHarqZT1OkMuUplCY/VMnJaqa5ko126r8CyKYqRoT4HQuqa6szVawGiB211VCQXJRVyLYtKUGO6mmnMUoi5H676/sv6c9py8bieMoyEyrI87lS0AhQ6QLnTjNbEO5xt6vFi7rEgcctD5nuEBwb/X2bmM2OdZFYXrIbXaZfq7fRKyzCQthfceCmySExOGI9ndCE/mS68X6NNFBVsVwb7zt0zSY6oGlf0/N2CR5sf8gwKYG1scr5Jyqmuifvqv433zepA0Sxj6WqC3ixlssNd8="
- GINKGO_VERBOSE_MODE=-v
jobs:
include:
# YAML alias, for settings shared across the tests
@@ -21,10 +21,12 @@ TEST_EXEC_NODES ?= 2
# Slow spec threshold for ginkgo tests. After this time (in second), ginkgo marks test as slow
SLOW_SPEC_THRESHOLD := 120

# Env variable VERBOSE is the verbose flag. Setting VERBOSE= turns off verbose output.
VERBOSE=-v
# Env variable GINKGO_VERBOSE_MODE is used to get control over enabling ginkgo
# verbose mode against each test target run. By default ginkgo verbosity is not enabled.
# To enable verbosity export or set env GINKGO_VERBOSE_MODE like "GINKGO_VERBOSE_MODE=-v"
GINKGO_VERBOSE_MODE ?=

GINKGO_FLAGS_ALL = $(VERBOSE) -randomizeAllSpecs -slowSpecThreshold=$(SLOW_SPEC_THRESHOLD) -timeout $(TIMEOUT)
GINKGO_FLAGS_ALL = $(GINKGO_VERBOSE_MODE) -randomizeAllSpecs -slowSpecThreshold=$(SLOW_SPEC_THRESHOLD) -timeout $(TIMEOUT)

# Flags for tests that must not be run in parallel.
GINKGO_FLAGS_SERIAL = $(GINKGO_FLAGS_ALL) -nodes=1
@@ -143,8 +145,7 @@ test-cmd-service:
# Run odo project command tests
.PHONY: test-cmd-project
test-cmd-project:
ginkgo -v -nodes=$(TEST_EXEC_NODES) -focus="odo project command tests" \
slowSpecThreshold=$(SLOW_SPEC_THRESHOLD) -randomizeAllSpecs tests/integration/ -timeout $(TIMEOUT)
ginkgo $(GINKGO_FLAGS) -focus="odo project command tests" tests/integration/

# Run odo app command tests
.PHONY: test-cmd-app
@@ -201,8 +202,7 @@ test-integration:
# Only service and link command tests are the part of this test run
.PHONY: test-integration-service-catalog
test-integration-service-catalog:
ginkgo -v -nodes=$(TEST_EXEC_NODES) \
slowSpecThreshold=$(SLOW_SPEC_THRESHOLD) -randomizeAllSpecs tests/integration/servicecatalog/ -timeout $(TIMEOUT)
ginkgo $(GINKGO_FLAGS) tests/integration/servicecatalog/

# Run core beta flow e2e tests
.PHONY: test-e2e-beta
@@ -246,8 +246,6 @@ upload-packages:
vendor-update:
glide update --strip-vendor



.PHONY: openshiftci-presubmit-unittests
openshiftci-presubmit-unittests:
./scripts/openshiftci-presubmit-unittests.sh
@@ -301,6 +301,16 @@ Expect(output).To(ContainSubstring("No file changes detected, skipping build"))

* Run tests on local env before pushing PRs

*Test variables:*

There are some test environment variable that helps to get more control over the test run and it's results

* TEST_EXEC_NODES: Env variable TEST_EXEC_NODES is used to pass spec execution type (parallel or sequential) for ginkgo tests. To run the specs sequentially use TEST_EXEC_NODES=1, otherwise by default the specs are run in parallel on 2 ginkgo test node. Any TEST_EXEC_NODES value greater than one runs the spec in parallel on the same number of ginkgo test nodes.

* SLOW_SPEC_THRESHOLD: Env variable SLOW_SPEC_THRESHOLD is used for ginkgo tests. After this time (in second), ginkgo marks test as slow. The default value is set to 120s.

* GINKGO_VERBOSE_MODE: Env variable GINKGO_VERBOSE_MODE is used to get control over enabling ginkgo verbose mode against each test target run. By default ginkgo verbosity is not enabled. To enable verbosity export or set env GINKGO_VERBOSE_MODE like `GINKGO_VERBOSE_MODE=-v`.

*Running integration tests:*

By default, tests are run against the `odo` binary placed in the PATH which is created by command `make`. Integration tests can be run in two (parallel and sequential) ways. To control the parallel run use environment variable `TEST_EXEC_NODES`. For example component test can be run
@@ -7,6 +7,7 @@ set -x

export CI="openshift"
export TIMEOUT="30m"
export GINKGO_VERBOSE_MODE="-v"
make configure-installer-tests-cluster
make bin
mkdir -p $GOPATH/bin
@@ -7,6 +7,7 @@ set -x

export CI="openshift"
export TIMEOUT="30m"
export GINKGO_VERBOSE_MODE="-v"
make configure-installer-tests-cluster
make bin
go get -u github.com/onsi/ginkgo/ginkgo
@@ -7,6 +7,7 @@ set -x

export CI="openshift"
export TIMEOUT="30m"
export GINKGO_VERBOSE_MODE="-v"
make configure-installer-tests-cluster
make bin
mkdir -p $GOPATH/bin

0 comments on commit ef844cb

Please sign in to comment.
You can’t perform that action at this time.