diff --git a/grpc-service-support/test/conftest.py b/grpc-service-support/test/conftest.py index 664bc422..3dcc5582 100644 --- a/grpc-service-support/test/conftest.py +++ b/grpc-service-support/test/conftest.py @@ -13,10 +13,11 @@ def pytest_sessionstart(session): shutil.copy("../AppManifest.json", "./app/AppManifest.json") # FIXME: The C++ base image does not install conan globally - # but just for the vscode user, hence we have to symlink - # the executable until conan is available globally + # but just for the vscode user, hence we have to download + # conan manually here. Can be removed once conan is installed + # globally. if os.environ["VELOCITAS_TEST_LANGUAGE"] == "cpp": - os.symlink("/home/vscode/.local/bin/conan", "/usr/bin/conan") + subprocess.check_call(["python", "-m", "pip", "install", "conan==1.60.2"]) - subprocess.call(["velocitas", "init", "-f", "-v"], stdin=subprocess.PIPE) - subprocess.call(["velocitas", "sync"], stdin=subprocess.PIPE) + subprocess.check_call(["velocitas", "init", "-f", "-v"], stdin=subprocess.PIPE) + subprocess.check_call(["velocitas", "sync"], stdin=subprocess.PIPE) diff --git a/setup/test/conftest.py b/setup/test/conftest.py index 288b20d7..c23feaab 100644 --- a/setup/test/conftest.py +++ b/setup/test/conftest.py @@ -8,4 +8,3 @@ def pytest_sessionstart(session): """ os.chdir(os.environ["VELOCITAS_TEST_ROOT"]) - print(os.getcwd()) diff --git a/setup/test/test_integration.py b/setup/test/test_integration.py index e3bf22c8..6e3eac4b 100644 --- a/setup/test/test_integration.py +++ b/setup/test/test_integration.py @@ -105,6 +105,7 @@ def test_files_synced(): changed_file.find(f"setup/src/{language}") != -1 ) + subprocess.check_call(["velocitas", "init", "-f", "-v"]) subprocess.check_call(["velocitas", "sync"]) git_status_output = subprocess.check_output( diff --git a/vehicle-model-lifecycle/test/conftest.py b/vehicle-model-lifecycle/test/conftest.py new file mode 100644 index 00000000..c23feaab --- /dev/null +++ b/vehicle-model-lifecycle/test/conftest.py @@ -0,0 +1,10 @@ +import os + + +def pytest_sessionstart(session): + """ + Called after the Session object has been created and + before performing collection and entering the run test loop. + """ + + os.chdir(os.environ["VELOCITAS_TEST_ROOT"])