Fix cross-platform test assumptions

This commit is contained in:
nomoreshow
2026-09-04 01:04:36 +03:00
parent e0eae4d8fe
commit 1f57455a34
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -205,6 +205,7 @@ class InstallProgram(Local):
# These fixtures are Ubuntu release archives. Keep checking that path # These fixtures are Ubuntu release archives. Keep checking that path
# on every host, including the Mac that checks the macOS backend. # on every host, including the Mac that checks the macOS backend.
self.patch_attr(sys, "platform", "linux") self.patch_attr(sys, "platform", "linux")
self.patch_attr(ggml.platform, "machine", lambda: "x86_64")
# Built once, because the release listing has to publish its checksum # Built once, because the release listing has to publish its checksum
# and a tarball is not the same bytes twice. # and a tarball is not the same bytes twice.
self.archive = tarball({ self.archive = tarball({
+3 -1
View File
@@ -21,7 +21,8 @@ WORKFLOW = ROOT / ".github" / "workflows" / "whisper-vulkan.yml"
class WhisperVulkanPackaging(unittest.TestCase): class WhisperVulkanPackaging(unittest.TestCase):
@unittest.skipUnless(shutil.which("bash"), "bash is unavailable") @unittest.skipUnless(sys.platform != "win32" and shutil.which("bash"),
"bash syntax check is unavailable")
def test_the_release_scripts_parse_as_shell(self): def test_the_release_scripts_parse_as_shell(self):
for name in ("build-package.sh", "validate-package.sh", for name in ("build-package.sh", "validate-package.sh",
"smoke-runtime.sh"): "smoke-runtime.sh"):
@@ -108,6 +109,7 @@ class WhisperVulkanPackaging(unittest.TestCase):
self.assertIn("libvulkan-dev=", dockerfile) self.assertIn("libvulkan-dev=", dockerfile)
self.assertIn("shaderc=", dockerfile) self.assertIn("shaderc=", dockerfile)
key = (PACKAGING / "lunarg-signing-key-pub.asc").read_bytes() key = (PACKAGING / "lunarg-signing-key-pub.asc").read_bytes()
key = key.replace(b"\r\n", b"\n")
self.assertEqual( self.assertEqual(
"aa1c3c29673140e77f0d6a9aaeed5d9b5621e305ead51c59fae4458bbb4df92b", "aa1c3c29673140e77f0d6a9aaeed5d9b5621e305ead51c59fae4458bbb4df92b",
hashlib.sha256(key).hexdigest(), hashlib.sha256(key).hexdigest(),