From 2533e6c40ca7277e03e09e7d84074dc5e09df721 Mon Sep 17 00:00:00 2001 From: Antoine Paletta <98616558+apaletta3@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:44:06 +0200 Subject: [PATCH] ci: fix python unit tests --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index aef1b10c..0eeb8113 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,9 @@ docker_release_image_cpp_repository := $(docker_image_repository)-cpp docker_release_image_python_repository := $(docker_image_repository)-python docker_release_image_jupyter_repository := $(docker_image_repository)-jupyter +test_python_version := 3.11 +test_python_directory := /usr/local/lib/python${test_python_version}/dist-packages + jupyter_notebook_port := 9005 jupyter_python_version := 3.11 jupyter_python_version_without_dot := $(shell echo $(jupyter_python_version) | sed 's/\.//') @@ -530,10 +533,10 @@ test-unit-python-standalone: ## Run Python unit tests (standalone) $(docker_development_image_repository):$(docker_image_version) \ /bin/bash -c "cmake -DBUILD_PYTHON_BINDINGS=ON -DBUILD_UNIT_TESTS=OFF .. \ && $(MAKE) -j 4 \ - && python$(jupyter_python_version) -m pip install --root-user-action=ignore bindings/python/OpenSpaceToolkit*Py-python-package-$(jupyter_python_version) \ - && python$(jupyter_python_version) -m pip install plotly pandas \ - && cd /usr/local/lib/python$(jupyter_python_version)/dist-packages/ostk/$(project_name)/ \ - && python$(jupyter_python_version) -m pytest -sv ." + && python${test_python_version} -m pip install --root-user-action=ignore --target=${test_python_directory} bindings/python/OpenSpaceToolkit*Py-python-package-${test_python_version} \ + && python${test_python_version} -m pip install --root-user-action=ignore --target=${test_python_directory} plotly pandas \ + && cd ${test_python_directory}/ostk/$(project_name)/ \ + && python${test_python_version} -m pytest -sv ." .PHONY: test-unit-python-standalone