-
Notifications
You must be signed in to change notification settings - Fork 93
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
Update Makefile to support running specific unit and e2e tests (#1230) #1240
base: main
Are you sure you want to change the base?
Update Makefile to support running specific unit and e2e tests (#1230) #1240
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…-net#1230) Signed-off-by: Nitish Malang <[email protected]> Update Makefile to support running specific unit and e2e tests (kmesh-net#1230) Signed-off-by: Nitish Malang <[email protected]>
4b9adaa
to
7e59ab8
Compare
Makefile
Outdated
endif | ||
|
||
# Run specific E2E tests | ||
.PHONY: test-e2e-specific | ||
test-e2e-specific: |
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.
Instead of adding target for each feature, we would prefer using parameters.
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.
okay i am upadting it
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.
Removed -run Argument:
The -run argument was removed from the test-unit target because run-ut.sh does not support it.
Removed test-unit-specific and test-e2e-specific Targets:
Instead of adding new targets, we now use the UNIT_TEST_PATTERN and E2E_TEST_PATTERN variables to filter tests.
Simplified Test Targets:
The test-unit and test-e2e targets now simply call the respective scripts without additional filtering.
d4729e7
to
7e59ab8
Compare
./hack/run-ut.sh --local | ||
endif | ||
|
||
# Run E2E tests | ||
.PHONY: test-e2e | ||
test-e2e: |
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.
we already have make e2e, could you expand functionalities under it. Prefer not providing too many entries to run e2e
updated the Makefile to allow running specific unit and e2e tests based on a test pattern. This helps reduce testing time by allowing run only the relevant tests for their changes.
Changes:
UNIT_TEST_PATTERN
andE2E_TEST_PATTERN
variables to filter tests.test-unit-specific
andtest-e2e-specific
targets to run specific tests.test-unit
andtest-e2e
targets to support test filtering.Usage Examples:
make test-unit-specific UNIT_TEST_PATTERN="TestServices"
make test-e2e-specific E2E_TEST_PATTERN="TestServices"
make test
Fixes #1230.