Add arg to test function to be able to prefix test output directory
authorTim Mayberry <mojofunk@gmail.com>
Sat, 10 Aug 2013 08:49:45 +0000 (18:49 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Fri, 11 Oct 2013 12:36:19 +0000 (22:36 +1000)
This makes it much easier to find test output from a specific test

libs/ardour/test/test_common.cc
libs/ardour/test/test_common.h

index 2d26a4da8e87a4df046f5070cbbfb8886916808f..61f92972d1475583a1cc579df27d008cf8b1b37b 100644 (file)
@@ -37,13 +37,14 @@ test_search_path ()
 }
 
 std::string
-new_test_output_dir ()
+new_test_output_dir (std::string prefix)
 {
        std::string tmp_dir = Glib::build_filename (g_get_tmp_dir(), "ardour_test");
        std::string dir_name;
        std::string new_test_dir;
        do {
                ostringstream oss;
+               oss << prefix;
                oss << g_random_int ();
                dir_name = oss.str();
                new_test_dir = Glib::build_filename (tmp_dir, dir_name);
index 1ddc177a9e9352b0412ba8c053ad9b6d379c5ce9..91fd066ac2e72e82f9ce13ec5f626c305c3990d8 100644 (file)
@@ -23,7 +23,7 @@
 
 PBD::SearchPath test_search_path ();
 
-std::string new_test_output_dir ();
+std::string new_test_output_dir (std::string prefix = "");
 
 int get_test_sample_rate ();