From e842ae539a6eed355bebe2669e8fb8bb1b83c667 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 11:12:39 -0400 Subject: [PATCH] Fix portability of test and use temporary test --- libs/ardour/test/audio_region_test.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libs/ardour/test/audio_region_test.cc b/libs/ardour/test/audio_region_test.cc index c7008d90e5..df3fa72d10 100644 --- a/libs/ardour/test/audio_region_test.cc +++ b/libs/ardour/test/audio_region_test.cc @@ -16,6 +16,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + #include "pbd/compose.h" #include "ardour/playlist_factory.h" #include "ardour/source_factory.h" @@ -26,6 +28,7 @@ #include "ardour/audioplaylist.h" #include "audio_region_test.h" #include "test_globals.h" +#include "test_common.h" using namespace std; using namespace PBD; @@ -36,9 +39,7 @@ AudioRegionTest::setUp () { TestNeedingSession::setUp (); - /* This is important, otherwise createWritable will mark the source immutable (hence unwritable) */ - unlink ("libs/ardour/test/test.wav"); - string const test_wav_path = "libs/ardour/test/test.wav"; + std::string const test_wav_path = Glib::build_filename (new_test_output_dir(), "test.wav"); _playlist = PlaylistFactory::create (DataType::AUDIO, *_session, "test"); _audio_playlist = boost::dynamic_pointer_cast (_playlist); _source = SourceFactory::createWritable (DataType::AUDIO, *_session, test_wav_path, "", false, Fs);