diff options
author | Michael Meeks <michael.meeks@novell.com> | 2011-09-02 15:20:53 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@novell.com> | 2011-09-02 15:31:53 +0100 |
commit | da1073f13071d3ad1c12ae7d66950beb2414a02c (patch) | |
tree | 1416a7be9d9cd93ae47099c64c36834fb88b2e6c | |
parent | 7872be8ab6add3dddb47fc08a1e3fd3f42c244d6 (diff) |
let unit tests use the solver's config xml with OOO_CONFIG_REGISTRY_DIR
-rw-r--r-- | configmgr/source/components.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index ec2c0a6d00bb..488792881acf 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -511,7 +511,20 @@ Components::Components( lock_ = lock(); OSL_ASSERT(context.is()); - RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "begin parsing"); + + // Check if we are being used for in-tree unit tests ... + rtl::OUString aUnitTestDir; + if (rtl::Bootstrap::get( rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("OOO_CONFIG_REGISTRY_DIR") ), aUnitTestDir)) + { + parseXcsXcuLayer( 0, aUnitTestDir ); + // next is required for the (somewhat strange) filter configuration + parseModuleLayer( 1, aUnitTestDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/spool"))); + return; + } + + RTL_LOGFILE_TRACE("configmgr : begin parsing"); + parseXcsXcuLayer( 0, expand( @@ -582,7 +595,7 @@ Components::Components( "PackageRegistryBackend/configmgr.ini"))), true); parseModificationLayer(); - RTL_LOGFILE_TRACE_AUTHOR("configmgr", "sb", "end parsing"); + RTL_LOGFILE_TRACE("configmgr : end parsing"); } Components::~Components() |