Make RustRaptor the repository root and track its playable bundle
This commit is contained in:
1 parent
4b1edefeec
commit
8f459796b1
9860 files changed
+21084
-61019
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Build package-local Rust acceptance against the latest release library."""
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
root = Path(__file__).resolve().parent
|
||||
project = root.parents[2]
|
||||
deps = project / "RustRaptor/target/release/deps"
|
||||
libraries = sorted(deps.glob("libraptor_replica-*.rlib"), key=lambda p: p.stat().st_mtime, reverse=True)
|
||||
if not libraries:
|
||||
raise SystemExit("Build RustRaptor in release mode before this package-local check")
|
||||
output = project / ".reference/iron-coast-boss-4-validation"
|
||||
output.parent.mkdir(exist_ok=True)
|
||||
env = os.environ.copy()
|
||||
env["RAPTOR_PROJECT"] = str(project)
|
||||
local_lib = Path.home() / ".local/lib"
|
||||
env["LD_LIBRARY_PATH"] = f"{local_lib}:{env.get('LD_LIBRARY_PATH', '')}"
|
||||
env["LIBRARY_PATH"] = f"{local_lib}:{env.get('LIBRARY_PATH', '')}"
|
||||
subprocess.run(["rustc", "--edition=2024", "--test", str(root / "validate.rs"), "--extern", f"raptor_replica={libraries[0]}",
|
||||
"-L", f"dependency={deps}", "-L", str(local_lib), "-o", str(output)], check=True, env=env)
|
||||
subprocess.run([str(output), "--nocapture", "--test-threads=1"], check=True, env=env)
|
||||
Reference in new issue
Block a user