-
Notifications
You must be signed in to change notification settings - Fork 342
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
E2E tests: remove cargo dependency #6632
E2E tests: remove cargo dependency #6632
Conversation
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.
@dlon @Serock3 What do you think?
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
08f6006
to
15e0623
Compare
Updated scripts to require an env var TEST_DIST_DIR to be set for dist binaries to be used, as suggested in slack by @MarkusPettersson98 . Furthermore, I thought that it would be best that in the case where the variable is defined, then all binaries in dist/ need to be there, so that you do not end up in a situation where TEST_DIST_DIR is specified, but one or more of those binaries do not exist and are silently built and used from the currently checked out commit. |
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
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.
Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @magnus-lindstrom)
test/test-by-version.sh
line 17 at r2 (raw file):
echo " - TEST_REPORT : path to save the test results in a structured format" echo "Optional environment variables:" echo " - TEST_DIST_DIR: Relative path to a directory with prebuilt binaries as produced by scripts/build.sh."
"Optional environment variables:" is echoed twice 😊
Code quote:
echo "Optional environment variables:"
echo " - APP_VERSION: The version of the app to test (defaults to the latest stable release)"
echo " - APP_PACKAGE_TO_UPGRADE_FROM: The package version to upgrade from (defaults to none)"
echo " - TEST_FILTERS: specifies which tests to run (defaults to all)"
echo " - TEST_REPORT : path to save the test results in a structured format"
echo "Optional environment variables:"
echo " - TEST_DIST_DIR: Relative path to a directory with prebuilt binaries as produced by scripts/build.sh."
test/scripts/test-utils.sh
line 245 at r2 (raw file):
echo "**********************************" echo "* Using test-runner in dist/"
Replace dist/
with $TEST_DIST_DIR
😊
Code quote:
echo "* Using test-runner in dist/"
15e0623
to
0ef2d93
Compare
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.
Reviewed 2 of 2 files at r3.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @magnus-lindstrom)
0ef2d93
to
23c87f4
Compare
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.
Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
This commit enables the usage of the dist/ directory, and also adds mullvad-version to it so that test-by-version.sh can operate without rust installed at all. To make use of predefined binaries in a separate directory, refer to that directory by using the env var TEST_DIST_DIR=<dir path> and the binaries will be used if they can be found there. If TEST_DIST_DIR is specified, all of the following binaries need to be there: - connection-checker - mullvad-version - test-manager - test-runner Also added a /dev/null redirect of a cd output so that one's able to use CDPATH while running the tests.
23c87f4
to
b0ccea7
Compare
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.
Reviewed 1 of 1 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
What is introduced with this PR
This commit enables the usage of the dist/ directory, and also adds mullvad-version to it so that test-by-version.sh can operate without rust installed at all.
Also added a /dev/null redirect of a cd output so that one's able to use CDPATH while running the tests.
Why this is wanted
I would like to be able to run the e2e tests on a VM without having to compile the binaries at all, since that increases the disk size necessary for running the tests. The disk space needed drops by 20-30G this way.
How to test
scripts/container-run.sh scripts/build.sh
.This change is