Skip to content

testscripts: python tests for numpy and psycopg2 #2214

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

Merged
merged 1 commit into from
Aug 21, 2024
Merged

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Aug 1, 2024

Add tests that install Python with Devbox and then run scripts that import numpy
and psycopg2. They currently fail on Linux due to linker errors related to missing shared libraries.

To run the tests on Linux with Docker, run:

devbox run -e DEVBOX_RUN_FAILING_TESTS=1 docker-testscripts -test.run '^TestScripts$/python'

The new docker-testscripts script in devbox.json runs testscripts in a Docker
container to make it easier to test various Linux distros and architectures.

"python -m venv $VENV_DIR",
],
"scripts": {
"test": [
Copy link
Contributor

Choose a reason for hiding this comment

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

for these to run automatically theyneed to be called run_test. Maybe want to call it run_test_disabled ? Or add an env var so it exits 0 by default if env var is not set

devbox.json Outdated
@@ -39,6 +39,11 @@
"test-projects-only": "DEVBOX_RUN_PROJECT_TESTS=1 go test -v -timeout ${DEVBOX_GOLANG_TEST_TIMEOUT:-30m} ./... -run \"TestExamples|TestScriptsWithProjects\"",
"update-examples": "devbox run build && go run testscripts/testrunner/updater/main.go",
"tidy": "go mod tidy",

"test-linux-amd64": [
Copy link
Contributor

Choose a reason for hiding this comment

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

it feels a bit weird to have this in the top level devbox.json, maybe we add a devbox.json to testscripts? It could call out to this devbox in order to build the linux devbox

not a blocker

Add tests that install Python with Devbox and then run scripts that import numpy
and psycopg2. They currently fail on Linux due to linker errors.

To run the tests on Linux with Docker, run:

	devbox run -e DEVBOX_RUN_FAILING_TESTS=1 docker-testscripts -test.run '^TestScripts$/python'

The new docker-testscripts script in devbox.json runs testscripts in a Docker
container to make it easier to test various Linux distros and architectures.
@gcurtis gcurtis changed the title testscripts: add linker test for numpy testscripts: python tests for numpy and psycopg2 Aug 21, 2024
@gcurtis gcurtis merged commit d94c3da into main Aug 21, 2024
24 checks passed
@gcurtis gcurtis deleted the gcurtis/ldtests branch August 21, 2024 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants