diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-09-29 23:17:53 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-09-29 23:17:53 +0200 |
| commit | 4f652387cbeeda9b7b8ace71e047c450acf5c871 (patch) | |
| tree | 7b14894461cb883dbb100d6b9d4b8aeafe6624f0 | |
| parent | 742fe66c1331fe80752e8577d914085aae8945c2 (diff) | |
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.
| -rw-r--r-- | test/config_test.cc | 4 | ||||
| -rw-r--r-- | 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" << "<Config>\n" << "<Foo></Foo>\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 (); |
