-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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)) |
There was a problem hiding this comment.
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 $()
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see man 1 strip https://man7.org/linux/man-pages/man1/strip.1.html
Is the behavior you want is something like https://ioflood.com/blog/bash-trim-whitespace/#:~:text=Trimming%20whitespace%20in%20Bash%20is,all%20spaces%20in%20a%20string. ?
There was a problem hiding this comment.
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>
ebf582f
to
e3b180f
Compare
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.