Kaydet (Commit) 8e68391f authored tarafından Noel Power's avatar Noel Power

more tweaks to unittests, also move registrymodifications.xcu

registrymodifications.xcu has been moved to the solver ( unittest/user/data )
new OOO_CONFIG_REGISTRY_EXTRA_DIR env var will be used to specify the directory 'data' will be contained in so we can override various config items.
üst 9b4d493f
...@@ -520,7 +520,17 @@ Components::Components( ...@@ -520,7 +520,17 @@ Components::Components(
parseXcsXcuLayer( 0, aUnitTestDir ); parseXcsXcuLayer( 0, aUnitTestDir );
// next is required for the (somewhat strange) filter configuration // next is required for the (somewhat strange) filter configuration
parseModuleLayer( 1, aUnitTestDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/spool"))); parseModuleLayer( 1, aUnitTestDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/spool")));
parseModificationLayer(); // allow a directory to be specified to allow extra configuration to be stored
// for example to place a registrymodifications.xcu to override some configuration
rtl::OUString extra;
if (rtl::Bootstrap::get(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"OOO_CONFIG_REGISTRY_EXTRA_DIR")),
extra))
{
parseXcsXcuLayer(3, extra);
}
return; return;
} }
......
...@@ -100,6 +100,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_macros_test,\ ...@@ -100,6 +100,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_macros_test,\
--headless \ --headless \
--protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \ --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
-env:OOO_CONFIG_REGISTRY_DIR=$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) \ -env:OOO_CONFIG_REGISTRY_DIR=$(call gb_CppunitTarget__make_url,$(OUTDIR)/xml/registry) \
-env:OOO_CONFIG_REGISTRY_EXTRA_DIR=$(call gb_CppunitTarget__make_url,$(OUTDIR)/unittest/user) \
)) ))
# we need to # we need to
......
...@@ -129,10 +129,10 @@ public: ...@@ -129,10 +129,10 @@ public:
CPPUNIT_TEST_SUITE(ScMacrosTest); CPPUNIT_TEST_SUITE(ScMacrosTest);
//enable this test if you want to play with star basic macros in unit tests //enable this test if you want to play with star basic macros in unit tests
//works but does nothing useful yet //works but does nothing useful yet
// CPPUNIT_TEST(testStarBasic); CPPUNIT_TEST(testStarBasic);
//enable if you want to hack vba support for unit tests //enable if you want to hack vba support for unit tests
//does not work, still problems during loading //does not work, still problems during loading
// CPPUNIT_TEST(testVba); CPPUNIT_TEST(testVba);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
......
...@@ -6,3 +6,8 @@ mkdir: %_DEST%\inc\test ...@@ -6,3 +6,8 @@ mkdir: %_DEST%\inc\test
..\%__SRC%\lib\libtest.dll.a %_DEST%\lib\libtest.dll.a ..\%__SRC%\lib\libtest.dll.a %_DEST%\lib\libtest.dll.a
..\inc\test\testdllapi.hxx %_DEST%\inc\test\testdllapi.hxx ..\inc\test\testdllapi.hxx %_DEST%\inc\test\testdllapi.hxx
..\inc\test\bootstrapfixture.hxx %_DEST%\inc\test\bootstrapfixture.hxx ..\inc\test\bootstrapfixture.hxx %_DEST%\inc\test\bootstrapfixture.hxx
mkdir: %_DEST%\unittest
mkdir: %_DEST%\unittest\user
mkdir: %_DEST%\unittest\user\data
..\user-template\user\data\registrymodifications.xcu %_DEST%\unittest\user\data\registrymodifications.xcu
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment