From: Carl Hetherington Date: Tue, 29 Sep 2020 21:17:53 +0000 (+0200) Subject: Make unit tests use their own configuration rather than whatever X-Git-Tag: v2.15.104~64 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=4f652387cbeeda9b7b8ace71e047c450acf5c871 Make unit tests use their own configuration rather than whatever happens to be in $HOME. This is especially important for signer certificates; without this it looks like the ones from $HOME will be used. --- diff --git a/test/config_test.cc b/test/config_test.cc index 14cceb6a0..cd2b196cf 100644 --- a/test/config_test.cc +++ b/test/config_test.cc @@ -31,8 +31,8 @@ rewrite_bad_config () boost::system::error_code ec; boost::filesystem::remove ("build/test/config.xml", ec); - Config::override_path = "build/test"; - ofstream f ("build/test/config.xml"); + Config::override_path = "build/test/bad_config"; + ofstream f ("build/test/bad_config/config.xml"); f << "\n" << "\n" << "\n" diff --git a/test/test.cc b/test/test.cc index 32d32f988..8f8db3714 100644 --- a/test/test.cc +++ b/test/test.cc @@ -107,6 +107,9 @@ struct TestConfig { TestConfig () { + State::override_path = "build/test/state"; + boost::filesystem::remove_all (*State::override_path); + dcpomatic_setup (); setup_test_config ();