Files
deadinsideandClaude Opus 5.5 9f74a6035d Tidy the repository for publishing: layout, README (EN/RU), license, launcher save folder
- Layout: src/ (loader, runtime), scripts/ (image preparation, patch compiler),
  tests/, tools/ (developer tools, fetch_fsr4_assets.sh, bridge helper,
  diagnostics), docs/history/ (dated reports); build.sh, run.sh, CMake,
  packaging, tools and tests follow the new paths. Raw run log removed.
- Submodules: FSR-Vulkan points at upstream c64f093 and build.sh applies
  gpu/patches/fsr-vulkan to its working tree; LibAtrac9 registered in
  .gitmodules; build.sh initializes missing submodules.
- No absolute home paths in scripts; the desktop entry is a template
  installed by launcher/install-desktop.sh.
- Launcher: the save folder is chosen with a folder dialog (default shown,
  reset, open in the file manager), status icons that exist in Adwaita,
  upscaler asset status for FSR 4 / 4.1.1.
- README.md / README.ru.md: what it is, status, highlights, differences from
  shadPS4, build/run, assets, layout, roadmap, credits. LICENSE: GPL-2.0.
- tests/test_probe.py: expectations updated to the loader's current messages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 08:42:38 +03:00

45 lines
1.6 KiB
Python

from paths import ROOT
from pathlib import Path
import subprocess
import unittest
EXE = ROOT / 'out/runtime-test'
@unittest.skipUnless(EXE.exists(), 'run bash build.sh --test first')
class RuntimeTests(unittest.TestCase):
def run_case(self, *args):
return subprocess.run([str(EXE.resolve()), *args], capture_output=True, text=True, timeout=10)
def test_runtime_contracts(self):
r=self.run_case()
self.assertEqual(r.returncode,0,r.stdout+r.stderr)
self.assertIn('PASS: callback lifecycle',r.stdout)
def test_recursive_guard_fails_explicitly(self):
r=self.run_case('--guard-recursion')
self.assertEqual(r.returncode,21)
self.assertIn('recursive/concurrent static initialization',r.stderr)
def test_stack_corruption_is_not_ignored(self):
r=self.run_case('--stack-failure')
self.assertEqual(r.returncode,22)
self.assertIn('stack protector detected corruption',r.stderr)
def test_tls_bounds_are_checked(self):
r=self.run_case('--bad-tls')
self.assertEqual(r.returncode,21)
self.assertIn('unsupported TLS module/offset',r.stderr)
def test_rwlock_lifecycle_and_ownership(self):
r=self.run_case('--rwlock-lifecycle')
self.assertEqual(r.returncode,0,r.stdout+r.stderr)
def test_rwlock_multiple_readers_exclude_writer(self):
r=self.run_case('--rwlock-concurrency')
self.assertEqual(r.returncode,0,r.stdout+r.stderr)
def test_rwlock_timeouts_use_orbis_errors(self):
r=self.run_case('--rwlock-timeouts')
self.assertEqual(r.returncode,0,r.stdout+r.stderr)