mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-02 19:45:46 +00:00
d5f5648b37
We use cargo vendor to generate a .cargo/config file and the vendor directory. Vendoring allows us to lock our dependencies and to modify them easily from the top level Cargo.toml. We vendor all dependencies, including the crates.io ones, which allows for network isolated builds. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
29 lines
577 B
Python
29 lines
577 B
Python
import pytest
|
|
|
|
|
|
PROFILE_CI="ci"
|
|
PROFILE_DEVEL="devel"
|
|
|
|
|
|
def pytest_addoption(parser):
|
|
parser.addoption(
|
|
"--profile",
|
|
default=PROFILE_CI,
|
|
choices=[PROFILE_CI, PROFILE_DEVEL],
|
|
help="Profile for running the test: {} or {}".format(
|
|
PROFILE_CI,
|
|
PROFILE_DEVEL
|
|
)
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def profile(request):
|
|
return request.config.getoption("--profile")
|
|
|
|
|
|
# This is used for defining global variables in pytest.
|
|
def pytest_configure():
|
|
pytest.profile_ci = PROFILE_CI
|
|
pytest.profile_devel = PROFILE_DEVEL
|