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

ci(test): re-enable test_misc.TestScripts tests #2211

Merged
merged 1 commit into from
Mar 18, 2023

Conversation

mayeut
Copy link
Contributor

@mayeut mayeut commented Mar 18, 2023

Summary

  • OS: all
  • Bug fix: no
  • Type: scripts, tests
  • Fixes:

Description

Tests are being run with psutil installed in a virtual environment within cibuildwheel builds.

The scripts folder is not being found in this installation & thus, those tests are skipped.

This commit allows to pass the path of the scripts folder through an environment variable & re-enables those tests.

Tests are being run with psutil installed in a virtual environment
within cibuildwheel builds.

The scripts folder is not being found in this installation & thus,
those tests are skipped.

This commit allows to pass the path of the scripts folder through
an environment variable & re-enables those tests.

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
"PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py",
"PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py"
"env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/runner.py",
"env PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 PSUTIL_SCRIPTS_DIR={project}/scripts python {project}/psutil/tests/test_memleaks.py"
Copy link
Owner

Choose a reason for hiding this comment

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

what is "env" here?

Copy link
Owner

Choose a reason for hiding this comment

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

Not a pre-requisite for merging this PR, just mentioning it for the future, but we should apply the same fix to the Makefile:

TEST_PREFIX = PYTHONWARNINGS=always PSUTIL_DEBUG=1

Copy link
Contributor Author

@mayeut mayeut Mar 18, 2023

Choose a reason for hiding this comment

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

env is https://man7.org/linux/man-pages/man1/env.1.html
It was required to get this working on Windows in GitHub Actions.

@giampaolo giampaolo merged commit dc4f7f5 into giampaolo:master Mar 18, 2023
@giampaolo
Copy link
Owner

Merged. Thanks Matthieu.

@mayeut mayeut deleted the ci-test-scripts branch March 18, 2023 16:52
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