Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

tests: the recovery-record LAN address suite skips where bash is not a working shell

LOKI786090b1304d
diff --git a/tests/test_recovery_record_lan_address.py b/tests/test_recovery_record_lan_address.py
index 990da8211..ca3c056ba 100644
--- a/tests/test_recovery_record_lan_address.py
+++ b/tests/test_recovery_record_lan_address.py
@@ -13,6 +13,7 @@ Run from the repository root: python3 -m unittest discover -s tests -v
import json
import os
from pathlib import Path
+import shutil
import subprocess
import sys
import unittest
@@ -44,6 +45,10 @@ class RecordPerLanAddressTest(unittest.TestCase):
sent = harness.RecoveryRecordTest.sent
def run_script(self, script, host, port=None):
+ # Same guard as the harness: disable.sh and restore.sh are POSIX scripts. On Windows
+ # shutil.which finds the WSL launcher, which fails when no distro is installed.
+ if os.name != "posix" or not shutil.which("bash"):
+ self.skipTest(f"{script} is a POSIX script; it needs bash")
env = dict(os.environ, TV_HOST=host, HOME=str(self.home), FAKE_TV_STATE=str(self.state_path))
# Path.home() reads USERPROFILE on Windows, not HOME: without it the record lands in the real ~.
if os.name == "nt":