Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

makefile, e2e: Add ginkgo timeout #45

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

RamLavi
Copy link
Collaborator

@RamLavi RamLavi commented Dec 6, 2023

Currently the gikngo is set to a default of 10m then it shuts the e2e down.
In order to run realtime checkup with configurable timeout - adding ginkgo and tst flags.

@RamLavi RamLavi requested a review from orelmisan December 6, 2023 10:09
Makefile Outdated
@@ -24,6 +24,9 @@ KUBECONFIG ?= $(HOME)/.kube/config

PROJECT_WORKING_DIR := /go/src/github.com/kiagnose/kubevirt-realtime-checkup

E2E_TEST_TIMEOUT ?= 1h
E2E_TEST_ARGS ?= $(strip -test.v -test.timeout=$(E2E_TEST_TIMEOUT) -ginkgo.v -ginkgo.timeout=$(E2E_TEST_TIMEOUT) $(E2E_TEST_EXTRA_ARGS))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of the enclosing $() ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a Makefile, the $( ... ) syntax is used to denote the use of a variable. It is a way to expand the value of a variable within a string or command.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why is it needed in that context.
What will be the difference if

E2E_TEST_ARGS ?= strip -test.v -test.timeout=$(E2E_TEST_TIMEOUT) -ginkgo.v -ginkgo.timeout=$(E2E_TEST_TIMEOUT) $(E2E_TEST_EXTRA_ARGS)

will be used?

Also, why is ?= needed here?
AFAIU the semantics are that it could also be set from the outside.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the alternative you suggested without $(strip ...), if there are any leading or trailing spaces in the string, they would be included in the value of E2E_TEST_ARGS.
It's just a bit more cautious..

The ?= in E2E_TEST_ARGS ?=... is there so that we could potentially override the E2E_TEST_ARGS from outside the Makefile. It allows for flexibility.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that would remove all spaces.
I checked and it is OK without the strip.
If we see we need it we can put it back later.

Currently the ginkgo is set to a default of 10m then it shuts the e2e
down.
In order to run realtime checkup with configurable timeout - adding
ginkgo and test flags.

Signed-off-by: Ram Lavi <ralavi@redhat.com>
@RamLavi RamLavi merged commit be43422 into kiagnose:main Dec 12, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants