Fix building testroms project
fixes b8d5dd899
also addressed code style warnings and fixed a typo in GambatteSuite.BeforeAll
note the last acid suite fail is gone after a recent SameBoy update,
unfortunately the same update added a bunch of fails in the mealybug suite,
though the suite itself needs updating too
This commit is contained in:
parent
a5652ee3bc
commit
18a7201004
|
@ -82,7 +82,7 @@ namespace BizHawk.Tests.Testroms.GB.GambatteSuite
|
|||
[ClassInitialize]
|
||||
public static void BeforeAll(TestContext ctx)
|
||||
{
|
||||
if (!(GambatteHexStrTestCase.KnownFailures.IsSortedAsc() && GambatteHexStrTestCase.KnownFailures.IsSortedAsc())) throw new Exception(SUITE_ID + " known-failing testcase list must be sorted");
|
||||
if (!(GambatteHexStrTestCase.KnownFailures.IsSortedAsc() && GambatteRefImageTestCase.KnownFailures.IsSortedAsc())) throw new Exception(SUITE_ID + " known-failing testcase list must be sorted");
|
||||
TestUtils.PrepareDBAndOutput(SUITE_ID);
|
||||
}
|
||||
|
||||
|
|
|
@ -13,3 +13,4 @@ Note that firmware does not need to be copied here. They are taken from `../BizH
|
|||
> This test suite is huge and takes a **really long time** to run. Like several hours.
|
||||
|
||||
Summary of `BIZHAWKTEST_RUN_KNOWN_FAILURES=1 ./run_tests_release.sh` should read 13681 passed / 1304 skipped / 0 failed.
|
||||
TODO update these numbers
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace BizHawk.Tests.Testroms.GB
|
|||
"cgb-acid-hell" => "res.cgb_acid_hell_artifact.reference.png",
|
||||
"cgb-acid2" => "res.cgb_acid2_artifact.reference.png",
|
||||
"dmg-acid2" => $"res.dmg_acid2_artifact.reference-{(Setup.Variant.IsColour() ? "cgb" : "dmg")}.png",
|
||||
_ => throw new Exception()
|
||||
_ => throw new InvalidOperationException()
|
||||
};
|
||||
|
||||
public readonly string RomEmbedPath => TestName switch
|
||||
|
@ -29,7 +29,7 @@ namespace BizHawk.Tests.Testroms.GB
|
|||
"cgb-acid-hell" => "res.cgb_acid_hell_artifact.cgb-acid-hell.gbc",
|
||||
"cgb-acid2" => "res.cgb_acid2_artifact.cgb-acid2.gbc",
|
||||
"dmg-acid2" => "res.dmg_acid2_artifact.dmg-acid2.gb",
|
||||
_ => throw new Exception()
|
||||
_ => throw new InvalidOperationException()
|
||||
};
|
||||
|
||||
public readonly CoreSetup Setup;
|
||||
|
@ -78,7 +78,7 @@ namespace BizHawk.Tests.Testroms.GB
|
|||
|
||||
private static readonly IReadOnlyCollection<string> KnownFailures = new[]
|
||||
{
|
||||
"cgb-acid2 on CGB_C in SameBoy (no BIOS)",
|
||||
"", // none \o/
|
||||
};
|
||||
|
||||
[ClassCleanup]
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace BizHawk.Tests.Testroms.GB
|
|||
ConsoleVariant.CGB_C => biosAvailable ? SameBoySyncSettings_GBC_C_USEBIOS : SameBoySyncSettings_GBC_C_NOBIOS,
|
||||
ConsoleVariant.CGB_D => biosAvailable ? SameBoySyncSettings_GBC_D_USEBIOS : SameBoySyncSettings_GBC_D_NOBIOS,
|
||||
ConsoleVariant.DMG or ConsoleVariant.DMG_B => biosAvailable ? SameBoySyncSettings_GB_USEBIOS : SameBoySyncSettings_GB_NOBIOS,
|
||||
_ => throw new Exception()
|
||||
_ => throw new InvalidOperationException()
|
||||
};
|
||||
|
||||
public static DummyFrontend.ClassInitCallbackDelegate InitGBCore(CoreSetup setup, string romFilename, byte[] rom)
|
||||
|
@ -168,7 +168,7 @@ namespace BizHawk.Tests.Testroms.GB
|
|||
CoreNames.Gambatte => new Gameboy(coreComm, game, rom, GambatteSettings, GetGambatteSyncSettings(setup.Variant, setup.UseBIOS), deterministic: true),
|
||||
CoreNames.GbHawk => new GBHawk(coreComm, game, rom, new(), GetGBHawkSyncSettings(setup.Variant)),
|
||||
CoreNames.Sameboy => new Sameboy(coreComm, game, rom, SameBoySettings, GetSameBoySyncSettings(setup.Variant, setup.UseBIOS), deterministic: true),
|
||||
_ => throw new Exception()
|
||||
_ => throw new InvalidOperationException("unknown GB core")
|
||||
};
|
||||
var biosWaitDuration = setup.UseBIOS || setup.CoreName is CoreNames.Sameboy
|
||||
? setup.Variant.IsColour()
|
||||
|
|
|
@ -31,8 +31,11 @@ namespace BizHawk.Tests.Testroms.GB
|
|||
if (_initialised.Contains(suiteID)) return;
|
||||
if (_initialised.Count == 0)
|
||||
{
|
||||
Database.InitializeDatabase(Path.Combine(".", "gamedb", "gamedb.txt"), silent: true); // runs in the background; required for Database.GetGameInfo calls
|
||||
if (!OSTailoredCode.IsUnixHost) SetDllDirectory(Path.Combine("..", "output", "dll")); // on Linux, this is done by the shell script with the env. var. LD_LIBRARY_PATH
|
||||
Database.InitializeDatabase( // runs in the background; required for Database.GetGameInfo calls
|
||||
bundledRoot: Path.Combine(".", "gamedb"),
|
||||
userRoot: Path.Combine(".", "gamedb"),
|
||||
silent: true);
|
||||
if (!OSTailoredCode.IsUnixHost) _ = SetDllDirectory(Path.Combine("..", "output", "dll")); // on Linux, this is done by the shell script with the env. var. LD_LIBRARY_PATH
|
||||
}
|
||||
_initialised.Add(suiteID);
|
||||
DirectoryInfo di = new(suiteID);
|
||||
|
|
|
@ -18,7 +18,7 @@ res
|
|||
└─ rtc3test_artifact
|
||||
```
|
||||
|
||||
As with EmuHawk, the target framework and configuration for all the BizHawk project deps is dictated by this project. That means .NET Standard 2.0, or .NET 5 if the project supports it.
|
||||
As with EmuHawk, the target framework and configuration for all the BizHawk project deps is dictated by this project. That means .NET Standard 2.0, or .NET 6 if the project supports it.
|
||||
To build and run the tests in `Release` configuration (or `Debug` if you need that for some reason):
|
||||
- On Linux, run `run_tests_release.sh` or `run_tests_debug.sh`.
|
||||
- On Windows, pass `-c Release` to `dotnet test` (must `cd` to this project). Omitting `-c` will use `Debug`.
|
||||
|
@ -73,3 +73,4 @@ dotnet test -c Release -l "console;verbosity=detailed"
|
|||
```
|
||||
|
||||
Summary of `BIZHAWKTEST_RUN_KNOWN_FAILURES=1 ./run_tests_release.sh` should read 166 passed / 174 skipped / 0 failed.
|
||||
TODO update these numbers
|
||||
|
|
Loading…
Reference in New Issue