Resurrect profiling code.
[ardour.git] / libs / ardour / test / test_needing_session.cc
1 #include "midi++/manager.h"
2 #include "pbd/compose.h"
3 #include "pbd/enumwriter.h"
4 #include "ardour/session.h"
5 #include "ardour/audioengine.h"
6 #include "test_needing_session.h"
7 #include "test_util.h"
8
9 using namespace std;
10 using namespace ARDOUR;
11 using namespace PBD;
12
13 void
14 TestNeedingSession::setUp ()
15 {
16         string const test_session_path = "libs/ardour/test/test_session";
17         system (string_compose ("rm -rf %1", test_session_path).c_str());
18         _session = load_session (test_session_path, "test_session");
19 }
20
21 void
22 TestNeedingSession::tearDown ()
23 {
24         AudioEngine::instance()->remove_session ();
25         delete _session;
26         AudioEngine::instance()->stop (true);
27         
28         MIDI::Manager::destroy ();
29         AudioEngine::destroy ();
30 }