mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-04-17 14:22:32 -05:00
feat: YAML integration tests with fixtures (35 new, 118 total)
tests/fixtures/ with synthetic platforms, emulators, bios files: - test_existence.yml: required/optional present/missing - test_md5.yml: correct/wrong hash, zipped_file (3 cases), multi-hash Recalbox, truncated MD5 Batocera, dedup - test_inherit.yml: YAML inheritance - _shared.yml: shared groups - emulator profiles with aliases, standalone mode, alias type tests/test_integration.py covers: - existence/md5 mode severity counts - zipped_file inner ROM verification (3 cases) - Recalbox multi-hash + Batocera truncated MD5 - worst-status aggregation per destination - YAML inheritance - cross-reference: undeclared, standalone skipped, alias skipped - alias resolution - pack consistency (verify == pack counts) - shared groups parsing All tests use real files, real hashes, real functions, no mocking.
This commit is contained in:
5
tests/fixtures/emulators/test_emu_alias_only.yml
vendored
Normal file
5
tests/fixtures/emulators/test_emu_alias_only.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
emulator: TestAlias
|
||||
type: alias
|
||||
alias_of: test_emu_with_aliases
|
||||
systems: [test-system]
|
||||
files: []
|
||||
12
tests/fixtures/emulators/test_emu_with_aliases.yml
vendored
Normal file
12
tests/fixtures/emulators/test_emu_with_aliases.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
emulator: TestEmulator
|
||||
type: standalone + libretro
|
||||
systems: [test-system]
|
||||
files:
|
||||
- name: correct_hash.bin
|
||||
required: true
|
||||
aliases: [alt1.bin, alt2.bin]
|
||||
- name: optional_standalone.rom
|
||||
required: false
|
||||
mode: standalone
|
||||
- name: undeclared.bin
|
||||
required: true
|
||||
7
tests/fixtures/platforms/_shared.yml
vendored
Normal file
7
tests/fixtures/platforms/_shared.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
shared_groups:
|
||||
test_group:
|
||||
- name: shared_file.bin
|
||||
sha1: "0000000000000000000000000000000000shared"
|
||||
md5: "sharedmd5sharedmd5sharedmd5share"
|
||||
destination: "shared/shared_file.bin"
|
||||
required: false
|
||||
22
tests/fixtures/platforms/test_existence.yml
vendored
Normal file
22
tests/fixtures/platforms/test_existence.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
platform: TestExistence
|
||||
verification_mode: existence
|
||||
base_destination: system
|
||||
systems:
|
||||
test-system:
|
||||
files:
|
||||
- name: required_present.bin
|
||||
destination: required_present.bin
|
||||
required: true
|
||||
sha1: placeholder
|
||||
- name: required_missing.bin
|
||||
destination: required_missing.bin
|
||||
required: true
|
||||
sha1: "0000000000000000000000000000000000000000"
|
||||
- name: optional_present.bin
|
||||
destination: optional_present.bin
|
||||
required: false
|
||||
sha1: placeholder
|
||||
- name: optional_missing.bin
|
||||
destination: optional_missing.bin
|
||||
required: false
|
||||
sha1: "0000000000000000000000000000000000000001"
|
||||
3
tests/fixtures/platforms/test_inherit.yml
vendored
Normal file
3
tests/fixtures/platforms/test_inherit.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
inherits: test_md5
|
||||
platform: TestInherited
|
||||
base_destination: BIOS
|
||||
58
tests/fixtures/platforms/test_md5.yml
vendored
Normal file
58
tests/fixtures/platforms/test_md5.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
platform: TestMD5
|
||||
verification_mode: md5
|
||||
base_destination: bios
|
||||
systems:
|
||||
test-system:
|
||||
files:
|
||||
- name: correct_hash.bin
|
||||
destination: correct_hash.bin
|
||||
required: true
|
||||
md5: placeholder
|
||||
- name: wrong_hash.bin
|
||||
destination: wrong_hash.bin
|
||||
required: true
|
||||
md5: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
- name: no_md5_present.bin
|
||||
destination: no_md5_present.bin
|
||||
required: true
|
||||
- name: required_missing.bin
|
||||
destination: required_missing.bin
|
||||
required: true
|
||||
md5: "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
||||
- name: optional_missing.bin
|
||||
destination: optional_missing.bin
|
||||
required: false
|
||||
md5: "cccccccccccccccccccccccccccccccc"
|
||||
test-zip-system:
|
||||
files:
|
||||
- name: test.zip
|
||||
destination: test.zip
|
||||
required: true
|
||||
md5: placeholder_zip_md5
|
||||
zipped_file: inner.rom
|
||||
- name: test_bad.zip
|
||||
destination: test_bad.zip
|
||||
required: true
|
||||
md5: placeholder_bad_zip_md5
|
||||
zipped_file: inner.rom
|
||||
- name: test_missing_inner.zip
|
||||
destination: test_missing_inner.zip
|
||||
required: true
|
||||
md5: placeholder_missing_inner_md5
|
||||
zipped_file: not_there.rom
|
||||
test-recalbox-system:
|
||||
files:
|
||||
- name: multi_hash.bin
|
||||
destination: multi_hash.bin
|
||||
required: true
|
||||
md5: placeholder_multi
|
||||
- name: truncated_md5.bin
|
||||
destination: truncated_md5.bin
|
||||
required: true
|
||||
md5: placeholder_truncated
|
||||
test-dedup-system:
|
||||
files:
|
||||
- name: correct_hash.bin
|
||||
destination: correct_hash.bin
|
||||
required: true
|
||||
md5: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
Reference in New Issue
Block a user