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

Improve yc-libvhost-server tests #5

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

vsinitsyn
Copy link
Collaborator

Add explicit pytest dependency so it is checked on setup stage, and straightforward error message is printed if it's absent. Then, give TEST_SERVER_BINARY environment variable (also set by Meson) a precedence over the hardcoded path, so custom buildroots don't break tests.

Valentine Sinitsyn added 2 commits March 5, 2024 08:59
Tests we currently have use pytest framework, so fail fast on setup
stage if it's absent.

Signed-off-by: Valentin Sinitsyn <valesini@yandex-team.ru>
Tests already accept setting test server path via TEST_SERVER_BINARY
environment variable. However it was only effective if the test server
wasn't found at its usual location in the build directory.

Reverse the logic: check the environment first and only use a hard-coded
path as a fallback. This way, a custom libvhost server which doesn't
come bundled can be used in tests. This feels more intuitive as the
environment variable is now an override, not the default.

Signed-off-by: Valentin Sinitsyn <valesini@yandex-team.ru>
@d-tatianin d-tatianin merged commit 36ae296 into yandex-cloud:master Mar 5, 2024
3 checks passed
@vsinitsyn vsinitsyn deleted the tests_improved branch March 6, 2024 06:18
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.

None yet

2 participants