mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
Integrate the experimental Quest 3 and 3S port
This commit is contained in:
1 parent
10c12b2998
commit
883e8d40f6
23 files changed
+488
-9
No files matched your search
@@ -0,0 +1,23 @@
|
||||
from pathlib import Path
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
QUEST = Path(__file__).resolve().parents[1] / 'quest'
|
||||
|
||||
|
||||
@unittest.skipUnless(sys.platform == 'linux' and shutil.which('gcc'), 'needs Linux and gcc')
|
||||
class QuestKgslTest(unittest.TestCase):
|
||||
def test_allocation_passthrough_translation_and_cleanup(self):
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
binary = str(Path(folder) / 'test-kgsl')
|
||||
subprocess.run(['gcc', '-Wall', '-Wextra', '-Werror', '-O2', '-o', binary,
|
||||
str(QUEST / 'test_kgsl_compat.c'), str(QUEST / 'kgsl_compat.c')], check=True)
|
||||
result = subprocess.run([binary], capture_output=True, text=True, check=True, timeout=10)
|
||||
self.assertIn('PASS: 12 GPUOBJ', result.stdout)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
@@ -55,6 +55,20 @@ class RuntimeInputsTest(unittest.TestCase):
|
||||
with self.assertRaisesRegex(ValueError, 'sources changed'):
|
||||
runtime.verify(self.root)
|
||||
|
||||
def test_changed_quest_source_rejects_old_outputs(self):
|
||||
source = self.root / 'tools/quest/kgsl_compat.c'
|
||||
source.parent.mkdir(parents=True)
|
||||
source.write_text('old compatibility code')
|
||||
runtime.record(self.root)
|
||||
source.write_text('new compatibility code')
|
||||
with self.assertRaisesRegex(ValueError, 'sources changed'):
|
||||
runtime.verify(self.root)
|
||||
|
||||
def test_missing_quest_driver_cannot_be_attested(self):
|
||||
(self.root / 'app/build/prepared-assets/graphics_driver/adrenotools-turnip25.1.0-quest1.tzst').unlink()
|
||||
with self.assertRaisesRegex(ValueError, 'quest1.tzst'):
|
||||
runtime.record(self.root)
|
||||
|
||||
def test_modified_prebuilt_binary_is_rejected(self):
|
||||
runtime.record(self.root)
|
||||
(self.root / 'app/src/main/jniLibs/arm64-v8a/libproot.so').write_bytes(b'old APK binary')
|
||||
|
||||
Reference in new issue
Block a user