Use common test function to create temporary session

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

1
.gitignore vendored
View File

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

View File

@ -1,3 +1,5 @@
#include <glibmm/miscutils.h>
#include "midi++/manager.h" #include "midi++/manager.h"
#include "pbd/compose.h" #include "pbd/compose.h"
#include "pbd/enumwriter.h" #include "pbd/enumwriter.h"
@ -5,6 +7,7 @@
#include "ardour/audioengine.h" #include "ardour/audioengine.h"
#include "test_needing_session.h" #include "test_needing_session.h"
#include "test_util.h" #include "test_util.h"
#include "test_common.h"
using namespace std; using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
@ -13,9 +16,9 @@ using namespace PBD;
void void
TestNeedingSession::setUp () TestNeedingSession::setUp ()
{ {
string const test_session_path = "libs/ardour/test/test_session"; const string session_name("test_session");
system (string_compose ("rm -rf %1", test_session_path).c_str()); std::string new_session_dir = Glib::build_filename (new_test_output_dir(), session_name);
_session = load_session (test_session_path, "test_session"); _session = load_session (new_session_dir, "test_session");
} }
void 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, '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, '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, '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_sources = '''
test/automation_list_property_test.cc test/automation_list_property_test.cc
@ -499,6 +500,7 @@ def build(bld):
test/region_naming_test.cc test/region_naming_test.cc
test/control_surfaces_test.cc test/control_surfaces_test.cc
test/mtdm_test.cc test/mtdm_test.cc
test/session_test.cc
'''.split() '''.split()
# Tests that don't work # Tests that don't work