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.

25 lines
469 B
Python

2 years ago
#!/usr/bin/env python3
import os
from pathlib import Path
from typing import Optional
2 years ago
import pytest
2 years ago
from command import run
BIN: Optional[Path] = None
@pytest.fixture
2 years ago
def systemd_vaultd(project_root: Path) -> Path:
2 years ago
global BIN
if BIN:
return BIN
2 years ago
bin = os.environ.get("SYSTEMD_VAULTD_BIN")
2 years ago
if bin:
BIN = Path(bin)
return BIN
run(["go", "build", str(project_root)])
2 years ago
BIN = project_root / "systemd-vaultd"
2 years ago
return BIN