summaryrefslogtreecommitdiff
path: root/unotest/source
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/source
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/source')
-rw-r--r--unotest/source/cpp/bootstrapfixturebase.cxx13
1 files changed, 10 insertions, 3 deletions
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();