Automatic tests: Bug fixes

This commit is contained in:
Souryo 2016-08-27 13:25:38 -04:00
parent 215eeb3962
commit d2a4c14c12
3 changed files with 33 additions and 3 deletions

View file

@ -234,11 +234,11 @@ int32_t AutoRomTest::Run(string filename)
_runningTest = true;
//Start playing movie
Console::LoadROM("TestRom", &testRom);
Console::LoadROM(testName, &testRom);
Movie::Play(testMovie, false);
Console::Resume();
EmulationSettings::ClearFlags(EmulationFlags::Paused);
_signal.Wait();
_runningTest = false;

View file

@ -165,6 +165,7 @@ namespace Mesen.GUI.Forms
this.mnuReportBug = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
this.mnuAbout = new System.Windows.Forms.ToolStripMenuItem();
this.mnuRunAllGameTests = new System.Windows.Forms.ToolStripMenuItem();
this.panelRenderer.SuspendLayout();
this.menuStrip.SuspendLayout();
this.SuspendLayout();
@ -1134,7 +1135,8 @@ namespace Mesen.GUI.Forms
this.mnuTestRun,
this.mnuTestRecordFrom,
this.mnuTestStopRecording,
this.mnuRunAllTests});
this.mnuRunAllTests,
this.mnuRunAllGameTests});
this.mnuTests.Name = "mnuTests";
this.mnuTests.Size = new System.Drawing.Size(185, 22);
this.mnuTests.Text = "Tests";
@ -1275,6 +1277,13 @@ namespace Mesen.GUI.Forms
this.mnuAbout.Text = "About";
this.mnuAbout.Click += new System.EventHandler(this.mnuAbout_Click);
//
// mnuRunAllGameTests
//
this.mnuRunAllGameTests.Name = "mnuRunAllGameTests";
this.mnuRunAllGameTests.Size = new System.Drawing.Size(192, 22);
this.mnuRunAllGameTests.Text = "Run all game tests";
this.mnuRunAllGameTests.Click += new System.EventHandler(this.mnuRunAllGameTests_Click);
//
// frmMain
//
this.AllowDrop = true;
@ -1435,6 +1444,7 @@ namespace Mesen.GUI.Forms
private System.Windows.Forms.ToolStripMenuItem mnuPrescale3xFilter;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem20;
private System.Windows.Forms.ToolStripMenuItem mnuReportBug;
private System.Windows.Forms.ToolStripMenuItem mnuRunAllGameTests;
}
}

View file

@ -725,6 +725,16 @@ namespace Mesen.GUI.Forms
}
}
#if !HIDETESTMENU
if(keyData == Keys.Pause) {
if(InteropEmu.RomTestRecording()) {
InteropEmu.RomTestStop();
} else {
InteropEmu.RomTestRecord(ConfigManager.TestFolder + "\\" + InteropEmu.GetRomInfo().GetRomName() + ".mtp", true);
}
}
#endif
if(keyData == Keys.Escape && _emuThread != null && mnuPause.Enabled) {
PauseEmu();
return true;
@ -1090,6 +1100,16 @@ namespace Mesen.GUI.Forms
startInfo.WorkingDirectory = workingDirectory;
Process.Start(startInfo);
}
private void mnuRunAllGameTests_Click(object sender, EventArgs e)
{
string workingDirectory = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location));
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "TestHelper.exe";
startInfo.Arguments = "\"" + Path.Combine(ConfigManager.HomeFolder, "TestGames") + "\"";
startInfo.WorkingDirectory = workingDirectory;
Process.Start(startInfo);
}
private void UpdateScaleMenu(double scale)
{