Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
doosuu committed Aug 30, 2023
1 parent 5488eb8 commit 081e701
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
11 changes: 6 additions & 5 deletions grpc-service-support/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 0 additions & 1 deletion setup/test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ def pytest_sessionstart(session):
"""

os.chdir(os.environ["VELOCITAS_TEST_ROOT"])
print(os.getcwd())
1 change: 1 addition & 0 deletions setup/test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 10 additions & 0 deletions vehicle-model-lifecycle/test/conftest.py
Original file line number Diff line number Diff line change
@@ -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"])

0 comments on commit 081e701

Please sign in to comment.