Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,12 @@ Metroid Dread uses the following annotations in text to change color:

For running the full test suite, the following environment variables must be set.

| Variable | Purpose |
|--------------------|------------------------------------------------|
| SAMUS_RETURNS_PATH | Path to a Samus Returns extracted RomFS |
| DREAD_1_0_0_PATH | Path to a Metroid Dread v1.0.0 extracted RomFS |
| DREAD_2_1_0_PATH | Path to a Metroid Dread v2.1.0 extracted RomFS |
| Variable | Purpose |
|-----------------------|------------------------------------------------|
| SAMUS_RETURNS_PATH | Path to a Samus Returns extracted RomFS |
| SAMUS_RETURNS_JP_PATH | Path to a Samus Returns JP extracted RomFS |
| DREAD_1_0_0_PATH | Path to a Metroid Dread v1.0.0 extracted RomFS |
| DREAD_2_1_0_PATH | Path to a Metroid Dread v2.1.0 extracted RomFS |

If any of these variables are not set, the associated tests are skipped.

Expand Down
11 changes: 6 additions & 5 deletions src/mercury_engine_data_structures/game_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ class GameVersion(Enum):
toc_hash: bytes
all_files_hash: bytes

MSR = (0, "1.0.0", Game.SAMUS_RETURNS, 1, "E9F1963CCCD5002CF6DE6E844528DF46", "83E382FB3E95061185184CE7FCB45AF8")
DREAD_1_0_0 = (1, "1.0.0", Game.DREAD, 1, "8DEC0C18622C6DAC370F84CF3A3AC0B4", "862EB0111C28082F5730FACF583CEF7B")
DREAD_1_0_1 = (2, "1.0.1", Game.DREAD, 2, "35309081AF05C60CEBC476F78F3609B6", "A4F13719C40AE931DA419E005683C27C")
DREAD_2_0_0 = (3, "2.0.0", Game.DREAD, 4, "B36FB05261F2E4EAF0408760E1B983FD", "C4CD8407F138BF4C09DE8FEEE7B687A3")
DREAD_2_1_0 = (4, "2.1.0", Game.DREAD, 8, "782820635AC434A18DF11DE3D4052DD1", "F1A3ABE49305A16F4671E9E64EBCA119")
MSR_US = (0, "1.0.0", Game.SAMUS_RETURNS, 1, "E9F1963CCCD5002CF6DE6E844528DF46", "83E382FB3E95061185184CE7FCB45AF8")
MSR_JP = (1, "1.0.0", Game.SAMUS_RETURNS, 1, "76851DACC85181EA9EDAD43E1249F249", "")
DREAD_1_0_0 = (2, "1.0.0", Game.DREAD, 1, "8DEC0C18622C6DAC370F84CF3A3AC0B4", "862EB0111C28082F5730FACF583CEF7B")
DREAD_1_0_1 = (3, "1.0.1", Game.DREAD, 2, "35309081AF05C60CEBC476F78F3609B6", "A4F13719C40AE931DA419E005683C27C")
DREAD_2_0_0 = (4, "2.0.0", Game.DREAD, 4, "B36FB05261F2E4EAF0408760E1B983FD", "C4CD8407F138BF4C09DE8FEEE7B687A3")
DREAD_2_1_0 = (5, "2.1.0", Game.DREAD, 8, "782820635AC434A18DF11DE3D4052DD1", "F1A3ABE49305A16F4671E9E64EBCA119")

def __new__(cls, value: int, string: str, game: Game, bitmask: int, toc_hash: str, all_files_hash: str):
member = object.__new__(cls)
Expand Down
10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ def samus_returns_path():
return Path(get_env_or_skip("SAMUS_RETURNS_PATH"))


@pytest.fixture(scope="session")
def samus_returns_jp_path():
return Path(get_env_or_skip("SAMUS_RETURNS_JP_PATH"))


@pytest.fixture(scope="session")
def dread_path_100():
return Path(get_env_or_skip("DREAD_1_0_0_PATH"))
Expand All @@ -41,6 +46,11 @@ def samus_returns_tree(samus_returns_path):
return FileTreeEditor(ExtractedRomFs(samus_returns_path), Game.SAMUS_RETURNS)


@pytest.fixture(scope="session")
def samus_returns_jp_tree(samus_returns_jp_path):
return FileTreeEditor(ExtractedRomFs(samus_returns_jp_path), Game.SAMUS_RETURNS)


@pytest.fixture(scope="session")
def dread_tree_100(dread_path_100):
return FileTreeEditor(ExtractedRomFs(dread_path_100), Game.DREAD)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_version_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

# ignores unsupported dread versions
GAME_VERSIONS_TESTS = [
("samus_returns_path", GameVersion.MSR),
("samus_returns_path", GameVersion.MSR_US),
("samus_returns_jp_path", GameVersion.MSR_JP),
("dread_path_100", GameVersion.DREAD_1_0_0),
# ("dread_path_101", GameVersion.DREAD_1_0_1),
# ("dread_path_200", GameVersion.DREAD_2_0_0),
Expand Down
Loading