Skip to content
Snippets Groups Projects
Commit 6dce08c8 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon: Committed by Georgy Moshkin
Browse files

chore(test): support custom cargo target directories

Some users may change their "target-dir" cargo setting for example to
make it shared between all projects (may speed up some builds).
It that case our integration tests should be looking for the executable
in the right place.
parent 400b6cae
No related branches found
No related tags found
1 merge request!211chore(test): support custom cargo target directories
Pipeline #10583 passed
import io
import json
import os
import re
import sys
......@@ -533,7 +534,9 @@ def compile() -> None:
@pytest.fixture(scope="session")
def binary_path(compile, pytestconfig) -> str:
return os.path.realpath(pytestconfig.rootpath / "target/debug/picodata")
metadata = subprocess.check_output(["cargo", "metadata", "--format-version=1"])
target = json.loads(metadata)["target_directory"]
return os.path.realpath(os.path.join(target, "debug/picodata"))
@pytest.fixture(scope="session")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment