You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
468 B
Python
24 lines
468 B
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import pytest
|
|
from pathlib import Path
|
|
from typing import Optional
|
|
from command import run
|
|
|
|
BIN: Optional[Path] = None
|
|
|
|
|
|
@pytest.fixture
|
|
def systemd_vaultd(project_root: Path) -> Path:
|
|
global BIN
|
|
if BIN:
|
|
return BIN
|
|
bin = os.environ.get("SYSTEMD_VAULTD_BIN")
|
|
if bin:
|
|
BIN = Path(bin)
|
|
return BIN
|
|
run(["go", "build", str(project_root)])
|
|
BIN = project_root / "systemd-vaultd"
|
|
return BIN
|