From 4f652387cbeeda9b7b8ace71e047c450acf5c871 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 29 Sep 2020 23:17:53 +0200 Subject: [PATCH] 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. --- test/config_test.cc | 4 ++-- test/test.cc | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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 (); -- 2.30.2