Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cbz-g11-auditor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
with:
python-version: '3.11'
- name: Run census controls normally
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -m unittest tests.test_g11_census tests.test_g11_current_architecture_references
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -m unittest tests.test_g11_census tests.test_g11_current_architecture_references tests.test_g11_current_atlas_formal_bridge_reference
- name: Run census controls with optimization
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -O -m unittest tests.test_g11_census tests.test_g11_current_architecture_references
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S -O -m unittest tests.test_g11_census tests.test_g11_current_architecture_references tests.test_g11_current_atlas_formal_bridge_reference
- name: Run mutation self-test normally
run: env -u PYTHONPATH -u PYTHONHOME -u PYTHONPYCACHEPREFIX -u PYTHONSTARTUP -u PYTHONUSERBASE python3 -B -S tools/cbz/g11_mutation_selftest.py
- name: Run mutation self-test with optimization
Expand Down
6 changes: 4 additions & 2 deletions tests/test_atlas_formal_source_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ def tearDown(self):

def run_cli(self,*extra):
self.input.write_text(json.dumps(self.snapshot))
mode=['-O'] if sys.flags.optimize else []
return subprocess.run([sys.executable,'-B',*mode,str(TOOL),'--root',str(self.root),
flags=(['-B']
+ (['-O'] if sys.flags.optimize else [])
+ (['-O'] if sys.flags.optimize > 1 else []))
return subprocess.run([sys.executable]+flags+[str(TOOL),'--root',str(self.root),
'--snapshot',str(self.input),*extra],capture_output=True,text=True)

def test_current_bridge_reproduces_original_evidence_and_records_only_two_control_changes(self):
Expand Down
27 changes: 27 additions & 0 deletions tests/test_g11_current_atlas_formal_bridge_reference.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""Repository integration control for the current Atlas formal bridge CLI."""

import sys
import unittest
from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT / "tools" / "cbz"))
import g11_census as g11 # noqa: E402


class CurrentAtlasFormalBridgeReference(unittest.TestCase):
def test_atlas_formal_source_bridge_has_static_execution_reference(self):
paths = (
"tools/atlas_formal_source_bridge.py",
"tests/test_atlas_formal_source_bridge.py",
)
files = {path: (ROOT / path).read_bytes() for path in paths}
report = g11.census(files, sorted(files))["tools"]
self.assertTrue(
report["tools/atlas_formal_source_bridge.py"]["referenced"]
)


if __name__ == "__main__":
unittest.main()
Loading