13
0

Use common test function to create temporary session

This commit is contained in:
Paul Davis 2013-07-11 11:11:45 -04:00
parent d555b43f5b
commit dc491cffdb
3 changed files with 8 additions and 4 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
*.[oa]
*.o
*.os
*.template
*.binding
*.so
*.dylib

View File

@ -1,3 +1,5 @@
#include <glibmm/miscutils.h>
#include "midi++/manager.h"
#include "pbd/compose.h"
#include "pbd/enumwriter.h"
@ -5,6 +7,7 @@
#include "ardour/audioengine.h"
#include "test_needing_session.h"
#include "test_util.h"
#include "test_common.h"
using namespace std;
using namespace ARDOUR;
@ -13,9 +16,9 @@ using namespace PBD;
void
TestNeedingSession::setUp ()
{
string const test_session_path = "libs/ardour/test/test_session";
system (string_compose ("rm -rf %1", test_session_path).c_str());
_session = load_session (test_session_path, "test_session");
const string session_name("test_session");
std::string new_session_dir = Glib::build_filename (new_test_output_dir(), session_name);
_session = load_session (new_session_dir, "test_session");
}
void

View File

@ -483,6 +483,7 @@ def build(bld):
create_ardour_test_program(bld, obj.includes, 'region_naming', 'test_region_naming', ['test/region_naming_test.cc'])
create_ardour_test_program(bld, obj.includes, 'control_surface', 'test_control_surfaces', ['test/control_surfaces_test.cc'])
create_ardour_test_program(bld, obj.includes, 'mtdm_test', 'test_mtdm', ['test/mtdm_test.cc'])
create_ardour_test_program(bld, obj.includes, 'session_test', 'test_session', ['test/session_test.cc'])
test_sources = '''
test/automation_list_property_test.cc
@ -499,6 +500,7 @@ def build(bld):
test/region_naming_test.cc
test/control_surfaces_test.cc
test/mtdm_test.cc
test/session_test.cc
'''.split()
# Tests that don't work