Commit 168b808b authored by Gabriel Burt's avatar Gabriel Burt

[tests] Fix performance tests crash

parent 9798e1e7
......@@ -271,6 +271,7 @@ namespace Banshee.Tests
"--uninstalled",
Environment.GetEnvironmentVariable ("BANSHEE_DEV_OPTIONS") }, 0);
Log.Debugging = false;
Paths.ApplicationName = Application.InternalName;
Application.TimeoutHandler = RunTimeout;
Application.IdleHandler = RunIdle;
......@@ -285,23 +286,28 @@ namespace Banshee.Tests
private void RunBanshee ()
{
Gtk.Application.Init ();
ThreadAssist.InitializeMainThread ();
ThreadAssist.ProxyToMainHandler = Banshee.ServiceStack.Application.Invoke;
Application.PushClient (client);
Application.Run ();
music_library = ServiceManager.SourceManager.MusicLibrary;
var provider = DatabaseTrackInfo.Provider;
select_single_command = String.Format (
"SELECT {0} FROM {1} WHERE {2}{3}{4} = ?",
provider.Select, provider.From, provider.Where,
(String.IsNullOrEmpty (provider.Where) ? String.Empty : " AND "),
provider.PrimaryKey
);
client.Start ();
try {
Gtk.Application.Init ();
ThreadAssist.InitializeMainThread ();
ThreadAssist.ProxyToMainHandler = Banshee.ServiceStack.Application.Invoke;
Application.PushClient (client);
Application.Run ();
music_library = ServiceManager.SourceManager.MusicLibrary;
var provider = DatabaseTrackInfo.Provider;
select_single_command = String.Format (
"SELECT {0} FROM {1} WHERE {2}{3}{4} = ?",
provider.Select, provider.From, provider.Where,
(String.IsNullOrEmpty (provider.Where) ? String.Empty : " AND "),
provider.PrimaryKey
);
client.Start ();
} catch (Exception e) {
Console.WriteLine (e);
throw;
}
}
[TestFixtureTearDown]
......
......@@ -150,6 +150,7 @@ foreach my $rev_name (@ordered_revisions) {
#foreach my $asm (glob("*.dll"))
foreach my $asm (glob("Performance.dll")) {
for (my $i = 0; $i < $RUNS_PER_TEST; $i++) {
print " - Run $i\n";
`$ENV_OPTIONS nunit-console2 -nologo -noshadow -xml=$rev_dir/$i-$asm.xml $asm 2>/dev/null`;
`cp ~/.config/banshee-1/banshee.db.bak ~/.config/banshee-1/banshee.db`;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment