The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: mirror the source tree for 27 misfiled root tests; one PM home fixture
ethernetcb7c6881716e
diff --git a/.github/workflows/bootstrap-installer.yml b/.github/workflows/bootstrap-installer.ymlindex 1cc5343058c..1b2dd41de41 100644--- a/.github/workflows/bootstrap-installer.yml+++ b/.github/workflows/bootstrap-installer.yml@@ -123,7 +123,7 @@ jobs:shell: bashenv:HERMES_TEST_FILE_RETRIES: '0'- run: bash scripts/run_tests.sh tests/test_fresh_source_install.py -q -j 1+ run: bash scripts/run_tests.sh tests/scripts/test_fresh_source_install.py -q -j 1windows:name: install.ps1 protocol surfacediff --git a/.github/workflows/installer-tests.yml b/.github/workflows/installer-tests.ymlindex f785ff2e8c7..1fd485841b4 100644--- a/.github/workflows/installer-tests.yml+++ b/.github/workflows/installer-tests.yml@@ -56,4 +56,4 @@ jobs:shell: bashenv:HERMES_TEST_FILE_RETRIES: '0'- run: bash scripts/run_tests.sh tests/test_source_launcher_stages.py -k powershell_stage -q -j 1+ run: bash scripts/run_tests.sh tests/pm/test_source_launcher_stages.py -k powershell_stage -q -j 1diff --git a/.github/workflows/termux-verify.yml b/.github/workflows/termux-verify.ymlindex 7a55cddd9a8..e952724002e 100644--- a/.github/workflows/termux-verify.yml+++ b/.github/workflows/termux-verify.yml@@ -50,13 +50,13 @@ jobs:- name: Run the native linker and wheel contractsrun: |bash scripts/run_tests.sh -j 2 \- tests/test_termux_python_linkage.py tests/test_termux_retag_wheel.py \- tests/test_termux_build_wheels.py \- tests/test_termux_wheelhouse_cache.py tests/test_termux_runtime_libs.py \+ tests/scripts/test_termux_python_linkage.py tests/scripts/test_termux_retag_wheel.py \+ tests/scripts/test_termux_build_wheels.py \+ tests/scripts/test_termux_wheelhouse_cache.py tests/scripts/test_termux_runtime_libs.py \tests/scripts/test_archive_inputs.py \- tests/test_termux_launchers.py tests/test_pm_bionic.py \- tests/pm/test_stage_only.py tests/pm/test_deb_safety.py tests/test_stage_apt_repo.py \- tests/test_run_tests_shell.py+ tests/scripts/test_termux_launchers.py tests/pm/test_pm_bionic.py \+ tests/pm/test_stage_only.py tests/pm/test_deb_safety.py tests/scripts/test_stage_apt_repo.py \+ tests/scripts/test_run_tests_shell.pytui:name: Prebuilt TUI checksdiff --git a/scripts/gen-bootstrap-pins.py b/scripts/gen-bootstrap-pins.pyindex d7bb931d550..edc7b40adea 100644--- a/scripts/gen-bootstrap-pins.py+++ b/scripts/gen-bootstrap-pins.py@@ -8,7 +8,7 @@ rely on that early (no jq guarantee; python is what uv installs on Windows).Instead, this script derives a plain-data fragment from pm/lock.json — theSAME authority the pm package manager uses for every managed tool — andsplices it between markers in each installer. The bytes are stored, the-truth is derived, and the drift test (tests/test_bootstrap_pins_fragment.py)+truth is derived, and the drift test (tests/scripts/test_bootstrap_pins_fragment.py)fails when they disagree.Run after bumping a bootstrapped tool in pm/lock.json:diff --git a/scripts/termux/deb_version.py b/scripts/termux/deb_version.pyindex 47f8d729fe0..c3065876e5d 100644--- a/scripts/termux/deb_version.py+++ b/scripts/termux/deb_version.py@@ -2,7 +2,7 @@"""Derive a Debian package version (or channel) from a hermes-agent release tag.Pure function; imported by scripts/termux/build_deb.sh and unit-tested by-tests/test_termux_deb_version.py (Task 4 of .hermes/plans/2026-08-31_termux-deb.md).+tests/scripts/test_termux_deb_version.py (Task 4 of .hermes/plans/2026-08-31_termux-deb.md).Mapping:v1.2.3 -> 1.2.3-1@@ -26,7 +26,7 @@ import sys# The canary timestamp shape MUST match the canonical _CANARY_TAG_RE in# hermes_cli/update_channel.py (exactly 8 or 14 digits, 20-prefixed) and# channel_for_tag in scripts/releases/r2.py. Cross-referenced by-# tests/test_termux_deb_version.py::test_canary_tag_shape_matches_canonical.+# tests/scripts/test_termux_deb_version.py::test_canary_tag_shape_matches_canonical._TAG_RE = re.compile(r"^v(?P<major>0|[1-9]\d*)\.(?P<minor>\d+)\.(?P<patch>\d+)"r"(?:-canary\.(?P<ts>20\d{6}(?:\d{6})?))?$"diff --git a/tests/test_data_dir_suffix.py b/tests/hermes_cli/test_data_dir_suffix.pysimilarity index 98%rename from tests/test_data_dir_suffix.pyrename to tests/hermes_cli/test_data_dir_suffix.pyindex 4f75f94f132..d4265d1f1cf 100644--- a/tests/test_data_dir_suffix.py+++ b/tests/hermes_cli/test_data_dir_suffix.py@@ -39,7 +39,7 @@ print(json.dumps(result))"""result = subprocess.run([sys.executable, "-c", script], env=env,- cwd=Path(__file__).resolve().parents[1],+ cwd=Path(__file__).resolve().parents[2],text=True, capture_output=True, check=True,)base = tmp_path / "AppData" / "Local" / "hermes" if sys.platform == "win32" else tmp_path / ".hermes"diff --git a/tests/test_old_updater_additional_shims.py b/tests/hermes_cli/test_old_updater_additional_shims.pysimilarity index 100%rename from tests/test_old_updater_additional_shims.pyrename to tests/hermes_cli/test_old_updater_additional_shims.pydiff --git a/tests/test_old_updater_main_shims.py b/tests/hermes_cli/test_old_updater_main_shims.pysimilarity index 100%rename from tests/test_old_updater_main_shims.pyrename to tests/hermes_cli/test_old_updater_main_shims.pydiff --git a/tests/test_old_updater_shims.py b/tests/hermes_cli/test_old_updater_shims.pysimilarity index 99%rename from tests/test_old_updater_shims.pyrename to tests/hermes_cli/test_old_updater_shims.pyindex b0025b26b8c..66d8a757ab5 100644--- a/tests/test_old_updater_shims.py+++ b/tests/hermes_cli/test_old_updater_shims.py@@ -168,7 +168,7 @@ def test_retired_probes_and_refreshes_do_no_work(no_external_work, tmp_path):@pytest.fixturedef old_updater():- path = Path(__file__).parent / "compat" / "old_updater_dependencies.py"+ path = Path(__file__).parents[1] / "compat" / "old_updater_dependencies.py"spec = importlib.util.spec_from_file_location("old_updater_dependencies", path)assert spec is not None and spec.loader is not Noneold = importlib.util.module_from_spec(spec)diff --git a/tests/test_plugin_historic_compat.py b/tests/hermes_cli/test_plugin_historic_compat.pysimilarity index 99%rename from tests/test_plugin_historic_compat.pyrename to tests/hermes_cli/test_plugin_historic_compat.pyindex d280af07921..3e2b919924f 100644--- a/tests/test_plugin_historic_compat.py+++ b/tests/hermes_cli/test_plugin_historic_compat.py@@ -107,7 +107,7 @@ plugins_transaction.recover_plugin_publication()"""return subprocess.run(- [sys.executable, "-I", "-S", "-c", script, str(Path(__file__).resolve().parents[1]), str(project), str(journal)],+ [sys.executable, "-I", "-S", "-c", script, str(Path(__file__).resolve().parents[2]), str(project), str(journal)],input=json.dumps(row), text=True, capture_output=True, check=False,env={**os.environ, "HERMES_HOME": str(Path(row["metadata"]).parent.parent)},)diff --git a/tests/pm/conftest.py b/tests/pm/conftest.pynew file mode 100644index 00000000000..13135161e6f--- /dev/null+++ b/tests/pm/conftest.py@@ -0,0 +1,15 @@+"""Shared fixtures for the PM suite."""+from pathlib import Path++import pytest+++def isolated_machine_home(tmp_path, monkeypatch):+ """Machine-scoped PM state (store, caches, profiles root) lands under tmp_path.++ Opt in per module with ``pytestmark = pytest.mark.usefixtures("isolated_machine_home")``.+ Does not cross a subprocess boundary — tests that spawn set HOME/USERPROFILE themselves.+ """+ monkeypatch.setattr(Path, "home", lambda: tmp_path)+ monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))diff --git a/tests/pm/test_artifact_mirror.py b/tests/pm/test_artifact_mirror.pyindex 7984ed4bcb7..bf070bbfd76 100644--- a/tests/pm/test_artifact_mirror.py+++ b/tests/pm/test_artifact_mirror.py@@ -23,7 +23,7 @@ def test_cold_consumers_recover_after_upstream_removal(tmp_path, dl_server, monkarchive.writestr("tool.txt", b"pinned and preserved")body = data.getvalue()if mode == "library":- from tests.test_termux_runtime_libs import _build_deb+ from tests.scripts.test_termux_runtime_libs import _build_debdeb = tmp_path / "test.deb"_build_deb(deb, "libmirror.so", b"pinned and preserved")body = deb.read_bytes()diff --git a/tests/pm/test_install_download_control.py b/tests/pm/test_install_download_control.pyindex c8405c7b5e0..c334d1e6317 100644--- a/tests/pm/test_install_download_control.py+++ b/tests/pm/test_install_download_control.py@@ -8,7 +8,6 @@ import jsonfrom functools import partialimport threadingimport zipfile-from pathlib import Pathimport pytest@@ -34,10 +33,7 @@ def archive(files: dict[str, bytes]) -> bytes:return output.getvalue()[email protected](autouse=True)-def isolate_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")@pytest.fixture(params=["install", "stage"])diff --git a/tests/test_node_resolution.py b/tests/pm/test_node_resolution.pysimilarity index 100%rename from tests/test_node_resolution.pyrename to tests/pm/test_node_resolution.pydiff --git a/tests/test_pm_bionic.py b/tests/pm/test_pm_bionic.pysimilarity index 99%rename from tests/test_pm_bionic.pyrename to tests/pm/test_pm_bionic.pyindex 318ccbeeace..f334352a032 100644--- a/tests/test_pm_bionic.py+++ b/tests/pm/test_pm_bionic.py@@ -13,7 +13,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parents[1]+REPO_ROOT = Path(__file__).resolve().parents[2]@pytest.fixture(scope="module")diff --git a/tests/pm/test_recovery.py b/tests/pm/test_recovery.pyindex ca8de22f37c..9dfde0e0553 100644--- a/tests/pm/test_recovery.py+++ b/tests/pm/test_recovery.py@@ -15,10 +15,7 @@ from pm.lock import Factsfrom pm.runtime import runtime_environmentfrom tests.pm._fixtures import _wheel[email protected](autouse=True)-def isolated_machine_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")diff --git a/tests/test_source_launcher_stages.py b/tests/pm/test_source_launcher_stages.pysimilarity index 99%rename from tests/test_source_launcher_stages.pyrename to tests/pm/test_source_launcher_stages.pyindex 8e3a1cb7925..d8cc5423f37 100644--- a/tests/test_source_launcher_stages.py+++ b/tests/pm/test_source_launcher_stages.py@@ -11,7 +11,7 @@ from pm.environments import install_state_dir, site_packagesfrom pm.lock import Lockfilefrom tests.hermes_cli.test_source_launcher_publication import fixture_tree-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]@pytest.mark.platforms("windows")diff --git a/tests/pm/test_uv_cache.py b/tests/pm/test_uv_cache.pyindex e9c7fcab945..34b0b149667 100644--- a/tests/pm/test_uv_cache.py+++ b/tests/pm/test_uv_cache.py@@ -2,16 +2,12 @@from __future__ import annotations-from pathlib import Pathimport pytestimport pm.packages as pkgs[email protected](autouse=True)-def isolated_machine_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")diff --git a/tests/pm/test_uv_python.py b/tests/pm/test_uv_python.pyindex e621c66765d..334db6042d1 100644--- a/tests/pm/test_uv_python.py+++ b/tests/pm/test_uv_python.py@@ -16,10 +16,7 @@ from pm.package import InstallErrorfrom pm.packages import Python, Uvfrom pm.store import current_target[email protected](autouse=True)-def isolated_machine_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")diff --git a/tests/pm/test_venv_sync_ambient_config.py b/tests/pm/test_venv_sync_ambient_config.pyindex e76e61e02bc..680cf1631c4 100644--- a/tests/pm/test_venv_sync_ambient_config.py+++ b/tests/pm/test_venv_sync_ambient_config.py@@ -10,10 +10,7 @@ import sysimport pytest[email protected](autouse=True)-def isolated_machine_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")def test_ambient_uv_config_does_not_affect_pm_venv_sync(tmp_path, monkeypatch):diff --git a/tests/pm/test_workspace.py b/tests/pm/test_workspace.pyindex 5382373ed48..35392037520 100644--- a/tests/pm/test_workspace.py+++ b/tests/pm/test_workspace.py@@ -22,10 +22,7 @@ from pm.environment import managed_environmentfrom tests.pm.test_environment_build import locked_project # noqa: F401[email protected](autouse=True)-def isolated_machine_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")@pytest.fixturediff --git a/tests/pm/test_workspace_build_inputs.py b/tests/pm/test_workspace_build_inputs.pyindex dc2378dd7a7..b0dc4c14281 100644--- a/tests/pm/test_workspace_build_inputs.py+++ b/tests/pm/test_workspace_build_inputs.py@@ -12,10 +12,7 @@ from tests.pm import _fixturesfrom pm.environment import managed_environment[email protected](autouse=True)-def isolated_machine_home(tmp_path, monkeypatch):- monkeypatch.setattr(Path, "home", lambda: tmp_path)- monkeypatch.setenv("HERMES_HOME", str(tmp_path / ".hermes"))+pytestmark = pytest.mark.usefixtures("isolated_machine_home")def _buildable_source(plugin):diff --git a/tests/scripts/test_archive_inputs.py b/tests/scripts/test_archive_inputs.pyindex df7a41a2d7f..178f784043b 100644--- a/tests/scripts/test_archive_inputs.py+++ b/tests/scripts/test_archive_inputs.py@@ -13,7 +13,7 @@ from pm.downloader import HashErrorfrom scripts.ci import archive_inputs as inputsfrom scripts.releases import r2from tests.scripts.test_release_r2 import r2_server # noqa: F401-from tests.test_termux_runtime_libs import _Server, _build_deb+from tests.scripts.test_termux_runtime_libs import _Server, _build_debdef write_pins(repo, packages, libs=None):diff --git a/tests/test_bootstrap_mirror.py b/tests/scripts/test_bootstrap_mirror.pysimilarity index 99%rename from tests/test_bootstrap_mirror.pyrename to tests/scripts/test_bootstrap_mirror.pyindex ca05616eb52..2360f36e822 100644--- a/tests/test_bootstrap_mirror.py+++ b/tests/scripts/test_bootstrap_mirror.py@@ -12,7 +12,7 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServerimport pytest-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]@pytest.fixturediff --git a/tests/test_bootstrap_pins_fragment.py b/tests/scripts/test_bootstrap_pins_fragment.pysimilarity index 90%rename from tests/test_bootstrap_pins_fragment.pyrename to tests/scripts/test_bootstrap_pins_fragment.pyindex a8da1c59313..f6344fb77bb 100644--- a/tests/test_bootstrap_pins_fragment.py+++ b/tests/scripts/test_bootstrap_pins_fragment.py@@ -5,7 +5,7 @@ from pathlib import Pathdef test_fragments_match_the_pin_table():- root = Path(__file__).resolve().parents[1]+ root = Path(__file__).resolve().parents[2]result = subprocess.run([sys.executable, str(root / "scripts/gen-bootstrap-pins.py"), "--check"],cwd=root, capture_output=True, text=True, timeout=60,diff --git a/tests/test_desktop_update_target.py b/tests/scripts/test_desktop_update_target.pysimilarity index 98%rename from tests/test_desktop_update_target.pyrename to tests/scripts/test_desktop_update_target.pyindex 8a4596d3e75..14fcb1fb71d 100644--- a/tests/test_desktop_update_target.py+++ b/tests/scripts/test_desktop_update_target.py@@ -14,7 +14,7 @@ import pytestfrom tests.installation_launcher_fixture import publish_fixture_launcher-SCRIPTS = Path(__file__).resolve().parents[1] / "scripts" / "desktop-update"+SCRIPTS = Path(__file__).resolve().parents[2] / "scripts" / "desktop-update"FAKE_CLI = """import jsonimport os@@ -23,7 +23,7 @@ import sysdef main():if '--version' in sys.argv:- print('Install directory: ' + os.environ.get('HANDOFF_FOREIGN', str(Path(__file__).resolve().parents[1]))); return 0+ print('Install directory: ' + os.environ.get('HANDOFF_FOREIGN', str(Path(__file__).resolve().parents[2]))); return 0if '--help' in sys.argv:print('update options')sys.exit(0)diff --git a/tests/test_fresh_source_install.py b/tests/scripts/test_fresh_source_install.pysimilarity index 99%rename from tests/test_fresh_source_install.pyrename to tests/scripts/test_fresh_source_install.pyindex 9326a2c202a..cb36afcada9 100644--- a/tests/test_fresh_source_install.py+++ b/tests/scripts/test_fresh_source_install.py@@ -20,7 +20,7 @@ import pytestfrom pm.store import current_targetfrom tests.pm._fixtures import _wheel, served as served-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]@pytest.mark.platforms("linux")diff --git a/tests/test_icon_build_dependencies.py b/tests/scripts/test_icon_build_dependencies.pysimilarity index 94%rename from tests/test_icon_build_dependencies.pyrename to tests/scripts/test_icon_build_dependencies.pyindex 9fed3a0b21b..de8de28a01e 100644--- a/tests/test_icon_build_dependencies.py+++ b/tests/scripts/test_icon_build_dependencies.py@@ -6,7 +6,7 @@ from pathlib import Pathdef test_icon_group_is_separate_from_runtime_extras():- root = Path(__file__).resolve().parents[1]+ root = Path(__file__).resolve().parents[2]uv = shutil.which("uv")assert uv, "uv is required for the dependency-selection contract"diff --git a/tests/test_install_ps1_desktop_stage.py b/tests/scripts/test_install_ps1_desktop_stage.pysimilarity index 99%rename from tests/test_install_ps1_desktop_stage.pyrename to tests/scripts/test_install_ps1_desktop_stage.pyindex d6ec2777315..3e5a8fd50c5 100644--- a/tests/test_install_ps1_desktop_stage.py+++ b/tests/scripts/test_install_ps1_desktop_stage.py@@ -35,7 +35,7 @@ from tests.installation_launcher_fixture import publish_fixture_launcherpytestmark = pytest.mark.platforms("windows")-REPO_ROOT = Path(__file__).resolve().parents[1]+REPO_ROOT = Path(__file__).resolve().parents[2]INSTALL_PS1 = REPO_ROOT / "scripts" / "install.ps1"_FAKE_PY = r'''diff --git a/tests/test_install_sh_launch_handoff.py b/tests/scripts/test_install_sh_launch_handoff.pysimilarity index 95%rename from tests/test_install_sh_launch_handoff.pyrename to tests/scripts/test_install_sh_launch_handoff.pyindex 2511f01cc7e..e814055e24f 100644--- a/tests/test_install_sh_launch_handoff.py+++ b/tests/scripts/test_install_sh_launch_handoff.py@@ -7,7 +7,7 @@ import subprocessimport pytestfrom tests.installation_launcher_fixture import publish_fixture_launcher-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]@pytest.mark.platforms('posix')@pytest.mark.parametrize('stage, expected', [('setup', ['setup']), ('gateway', ['gateway', 'install']), ('desktop', ['desktop', '--build-only'])])diff --git a/tests/test_install_sh_python_pin_indent.py b/tests/scripts/test_install_sh_python_pin_indent.pysimilarity index 98%rename from tests/test_install_sh_python_pin_indent.pyrename to tests/scripts/test_install_sh_python_pin_indent.pyindex 5dafb729ced..da697fe1acd 100644--- a/tests/test_install_sh_python_pin_indent.py+++ b/tests/scripts/test_install_sh_python_pin_indent.py@@ -14,7 +14,7 @@ import sysimport pytest-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]pytestmark = pytest.mark.platforms("posix")diff --git a/tests/test_install_stage_frames.py b/tests/scripts/test_install_stage_frames.pysimilarity index 98%rename from tests/test_install_stage_frames.pyrename to tests/scripts/test_install_stage_frames.pyindex 7c03e838e5e..6e38eb21f55 100644--- a/tests/test_install_stage_frames.py+++ b/tests/scripts/test_install_stage_frames.py@@ -7,7 +7,7 @@ import subprocessimport pytest-ROOT = Path(__file__).resolve().parents[1]+ROOT = Path(__file__).resolve().parents[2]SCRIPT = ROOT / "scripts" / "install.sh"diff --git a/tests/test_powershell_script_syntax.py b/tests/scripts/test_powershell_script_syntax.pysimilarity index 98%rename from tests/test_powershell_script_syntax.pyrename to tests/scripts/test_powershell_script_syntax.pyindex e5119cf75db..87ee9093053 100644--- a/tests/test_powershell_script_syntax.py+++ b/tests/scripts/test_powershell_script_syntax.py@@ -21,7 +21,7 @@ from pathlib import Pathimport pytest-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parent# Every PowerShell script a user or CI machine actually runs. Discovered,# not hardcoded: a new script in scripts/ gets gated automatically.diff --git a/tests/test_run_tests_shell.py b/tests/scripts/test_run_tests_shell.pysimilarity index 95%rename from tests/test_run_tests_shell.pyrename to tests/scripts/test_run_tests_shell.pyindex 684f4a90a8a..82098571350 100644--- a/tests/test_run_tests_shell.py+++ b/tests/scripts/test_run_tests_shell.py@@ -18,7 +18,7 @@ def test_shell_runner_executes_tests_and_propagates_failure(tmp_path):" assert False, 'runner failure propagation canary'\n",encoding="utf-8",)- root = Path(__file__).resolve().parents[1]+ root = Path(__file__).resolve().parents[2]result = subprocess.run(["bash", str(root / "scripts/run_tests.sh"), "-j", "1", str(case)],cwd=tmp_path, capture_output=True, text=True, timeout=180,diff --git a/tests/test_stage_apt_repo.py b/tests/scripts/test_stage_apt_repo.pysimilarity index 99%rename from tests/test_stage_apt_repo.pyrename to tests/scripts/test_stage_apt_repo.pyindex 2f2fd5c1ee6..a7cce91651d 100644--- a/tests/test_stage_apt_repo.py+++ b/tests/scripts/test_stage_apt_repo.py@@ -16,7 +16,7 @@ from pathlib import Pathimport pytestfrom tests.termux_fixtures import build_deb-REPO_ROOT = Path(__file__).resolve().parents[1]+REPO_ROOT = Path(__file__).resolve().parents[2]SCRIPTS = REPO_ROOT / "scripts" / "termux"sys.path.insert(0, str(SCRIPTS))diff --git a/tests/test_termux_build_wheels.py b/tests/scripts/test_termux_build_wheels.pysimilarity index 100%rename from tests/test_termux_build_wheels.pyrename to tests/scripts/test_termux_build_wheels.pydiff --git a/tests/test_termux_deb_version.py b/tests/scripts/test_termux_deb_version.pysimilarity index 98%rename from tests/test_termux_deb_version.pyrename to tests/scripts/test_termux_deb_version.pyindex 0f861c1bf32..9e66beb44a1 100644--- a/tests/test_termux_deb_version.py+++ b/tests/scripts/test_termux_deb_version.py@@ -7,7 +7,7 @@ from pathlib import Pathimport pytestfrom scripts.termux.deb_version import channel_for_tag, deb_version_for_tag-SCRIPT = Path(__file__).resolve().parents[1] / "scripts/termux/deb_version.py"+SCRIPT = Path(__file__).resolve().parents[2] / "scripts/termux/deb_version.py"@pytest.mark.parametrize("bom", ["", "\ufeff"])diff --git a/tests/test_termux_launchers.py b/tests/scripts/test_termux_launchers.pysimilarity index 100%rename from tests/test_termux_launchers.pyrename to tests/scripts/test_termux_launchers.pydiff --git a/tests/test_termux_python_linkage.py b/tests/scripts/test_termux_python_linkage.pysimilarity index 100%rename from tests/test_termux_python_linkage.pyrename to tests/scripts/test_termux_python_linkage.pydiff --git a/tests/test_termux_retag_wheel.py b/tests/scripts/test_termux_retag_wheel.pysimilarity index 96%rename from tests/test_termux_retag_wheel.pyrename to tests/scripts/test_termux_retag_wheel.pyindex cf4cee048dd..c1ee7181e11 100644--- a/tests/test_termux_retag_wheel.py+++ b/tests/scripts/test_termux_retag_wheel.py@@ -17,7 +17,7 @@ from pathlib import Pathimport pytestfrom tests.termux_fixtures import write_wheel, verify_record-SCRIPTS_DIR = Path(__file__).resolve().parent.parent / "scripts" / "termux"+SCRIPTS_DIR = Path(__file__).resolve().parent.parent.parent / "scripts" / "termux"sys.path.insert(0, str(SCRIPTS_DIR))import retag_wheel # noqa: E402diff --git a/tests/test_termux_runtime_libs.py b/tests/scripts/test_termux_runtime_libs.pysimilarity index 99%rename from tests/test_termux_runtime_libs.pyrename to tests/scripts/test_termux_runtime_libs.pyindex f0297b6cc18..51d94d149c9 100644--- a/tests/test_termux_runtime_libs.py+++ b/tests/scripts/test_termux_runtime_libs.py@@ -17,7 +17,7 @@ from tests.termux_fixtures import build_debimport sys-REPO_ROOT = Path(__file__).resolve().parent.parent+REPO_ROOT = Path(__file__).resolve().parent.parent.parentsys.path.insert(0, str(REPO_ROOT))sys.path.insert(0, str(REPO_ROOT / "scripts" / "termux"))diff --git a/tests/test_termux_wheelhouse_cache.py b/tests/scripts/test_termux_wheelhouse_cache.pysimilarity index 98%rename from tests/test_termux_wheelhouse_cache.pyrename to tests/scripts/test_termux_wheelhouse_cache.pyindex 91c2307e621..d9caa737284 100644--- a/tests/test_termux_wheelhouse_cache.py+++ b/tests/scripts/test_termux_wheelhouse_cache.py@@ -65,7 +65,7 @@ def test_cache_rejects_incomplete_or_inconsistent_manifests(tmp_path, damage):def test_cache_cli_keeps_commit_and_tag_provenance_distinct(tmp_path):payload, _ = cache_tree(tmp_path)- repo = Path(__file__).resolve().parents[1]+ repo = Path(__file__).resolve().parents[2]args = [sys.executable, str(repo / 'scripts/termux/wheelhouse_cache.py'), 'write','--payload', str(payload), '--repo', str(repo), '--builder', 'fixture-image','--platform-tag', 'android_24_arm64_v8a', '--python-abi', 'cp314']