Fix process-name ownership and module lookup outputs, add explicit SPKI hashing and bounded chain access, and improve WDM integration. Deprecate superseded entry points with migration guidance and align branch code and tests with the library style.
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""Test the actual kernel probe body with mock CI; run in an x64 VS dev shell."""
|
|
|
|
from pathlib import Path
|
|
import re
|
|
import subprocess
|
|
import tempfile
|
|
|
|
tests = Path(__file__).resolve().parent
|
|
header = (tests.parent / "include/Domito.MinCrypt.h").read_text(encoding="utf-8-sig")
|
|
names = ["MINCRYPT_MAX_HASH_LENGTH", "DOMITO_CI_VALIDATE_FLAG_BROADEN_ROOT_ACCEPTANCE"]
|
|
constants = "\n".join(
|
|
re.search(r"^#define\s+" + name + r"\s+[^\r\n]+", header, re.M)[0] for name in names
|
|
)
|
|
with tempfile.TemporaryDirectory(prefix="domito-ci-probe-") as temp:
|
|
build = Path(temp)
|
|
(build / "ci-probe-constants.inc").write_text(constants + "\n", encoding="utf-8")
|
|
exe = build / "ci-probe-tests.exe"
|
|
subprocess.run(
|
|
[
|
|
"cl",
|
|
"/nologo",
|
|
"/EHsc",
|
|
"/W4",
|
|
"/WX",
|
|
"/std:c++17",
|
|
"/I" + str(build),
|
|
str(tests / "ci-file-object-probe-tests.cpp"),
|
|
"/Fe" + str(exe),
|
|
"/Fo" + str(build / "ci-probe-tests.obj"),
|
|
],
|
|
cwd=build,
|
|
check=True,
|
|
)
|
|
subprocess.run([str(exe)], cwd=build, check=True)
|