diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2013-08-10 18:49:45 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2013-10-11 22:36:19 +1000 |
commit | 42b475069bf96a97f07a1f88b39a51ff8a5b77d4 (patch) | |
tree | 42f907614cef8b30920142905c7f73d8f6d1d282 /libs | |
parent | b91fa19fe79d61f8f9b7fef6d54accbedb6dbc23 (diff) |
Add arg to test function to be able to prefix test output directory
This makes it much easier to find test output from a specific test
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/test/test_common.cc | 3 | ||||
-rw-r--r-- | libs/ardour/test/test_common.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/test/test_common.cc b/libs/ardour/test/test_common.cc index 2d26a4da8e..61f92972d1 100644 --- a/libs/ardour/test/test_common.cc +++ b/libs/ardour/test/test_common.cc @@ -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); diff --git a/libs/ardour/test/test_common.h b/libs/ardour/test/test_common.h index 1ddc177a9e..91fd066ac2 100644 --- a/libs/ardour/test/test_common.h +++ b/libs/ardour/test/test_common.h @@ -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 (); |