summaryrefslogtreecommitdiff
path: root/unotest
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2011-10-27 17:11:26 +0100
committerNoel Power <noel.power@novell.com>2011-10-27 17:13:22 +0100
commited6b0d6bb1fd6344e68a04e833214c6399df7c50 (patch)
treef4e8a12a9c2346a8ca66d9dbfaa4b2ccf3e31cb9 /unotest
parentd3c18a6436e5e27f9d229a3b80a25d61d599461f (diff)
deliver test/user-template/user to solver, unittests will use new user dir
Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'unotest')
-rw-r--r--unotest/inc/unotest/bootstrapfixturebase.hxx2
-rw-r--r--unotest/source/cpp/bootstrapfixturebase.cxx13
2 files changed, 12 insertions, 3 deletions
diff --git a/unotest/inc/unotest/bootstrapfixturebase.hxx b/unotest/inc/unotest/bootstrapfixturebase.hxx
index 6edd3f5b5643..6176f057a368 100644
--- a/unotest/inc/unotest/bootstrapfixturebase.hxx
+++ b/unotest/inc/unotest/bootstrapfixturebase.hxx
@@ -56,6 +56,8 @@ class OOO_DLLPUBLIC_UNOTEST BootstrapFixtureBase : public CppUnit::TestFixture
protected:
::rtl::OUString m_aSrcRootURL;
::rtl::OUString m_aSrcRootPath;
+ ::rtl::OUString m_aSolverRootURL;
+ ::rtl::OUString m_aSolverRootPath;
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> m_xContext;
com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> m_xSFactory;
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx b/unotest/source/cpp/bootstrapfixturebase.cxx
index 3fccdf12ad56..4ae52cd0c190 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -44,17 +44,23 @@ using namespace ::com::sun::star;
// heavy lifting is deferred until setUp. setUp and tearDown are interleaved
// between the tests as you might expect.
test::BootstrapFixtureBase::BootstrapFixtureBase()
- : m_aSrcRootURL(RTL_CONSTASCII_USTRINGPARAM("file://"))
+ : m_aSrcRootURL(RTL_CONSTASCII_USTRINGPARAM("file://")), m_aSolverRootURL( m_aSrcRootURL )
{
const char* pSrcRoot = getenv( "SRC_ROOT" );
CPPUNIT_ASSERT_MESSAGE("SRC_ROOT env variable not set", pSrcRoot != NULL && pSrcRoot[0] != 0);
-
+ const char* pSolverRoot = getenv( "OUTDIR_FOR_BUILD" );
+ CPPUNIT_ASSERT_MESSAGE("$OUTDIR_FOR_BUILD env variable not set", pSolverRoot != NULL && pSolverRoot[0] != 0);
#ifdef WNT
if (pSrcRoot[1] == ':')
m_aSrcRootURL += rtl::OUString::createFromAscii( "/" );
+ if (pSolverRoot[1] == ':')
+ m_aSolverRootURL += rtl::OUString::createFromAscii( "/" );
#endif
m_aSrcRootPath = rtl::OUString::createFromAscii( pSrcRoot );
m_aSrcRootURL += m_aSrcRootPath;
+
+ m_aSolverRootPath = rtl::OUString::createFromAscii( pSolverRoot );
+ m_aSolverRootURL += m_aSolverRootPath;
}
test::BootstrapFixtureBase::~BootstrapFixtureBase()
@@ -70,8 +76,9 @@ void test::BootstrapFixtureBase::setUp()
{
// set UserInstallation to user profile dir in test/user-template
rtl::Bootstrap aDefaultVars;
+ rtl::OUString sUserInstallURL = m_aSolverRootURL + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/unittest" ) );
aDefaultVars.set( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserInstallation") ),
- getURLFromSrc("/test/user-template"));
+ sUserInstallURL);
m_xContext = cppu::defaultBootstrap_InitialComponentContext();
m_xFactory = m_xContext->getServiceManager();