[Libreoffice-commits] .: configmgr/source sc/CppunitTest_sc_macros_test.mk sc/qa test/prj test/user-template
Noel Power
noelp at kemper.freedesktop.org
Wed Oct 26 11:07:08 PDT 2011
configmgr/source/components.cxx | 12 +++++
sc/CppunitTest_sc_macros_test.mk | 1
sc/qa/unit/macros-test.cxx | 4 -
test/prj/d.lst | 5 ++
test/user-template/user/data/registrymodifications.xcu | 37 +++++++++++++++++
test/user-template/user/registrymodifications.xcu | 37 -----------------
6 files changed, 56 insertions(+), 40 deletions(-)
New commits:
commit 8e68391fc99b34702d76526e6b3ab4720ac017e4
Author: Noel Power <noel.power at novell.com>
Date: Wed Oct 26 19:05:50 2011 +0100
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.
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index f6257b6..0549f8a 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -520,7 +520,17 @@ Components::Components(
parseXcsXcuLayer( 0, aUnitTestDir );
// next is required for the (somewhat strange) filter configuration
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;
}
diff --git a/sc/CppunitTest_sc_macros_test.mk b/sc/CppunitTest_sc_macros_test.mk
index 8a9bd3d..0da6348 100644
--- a/sc/CppunitTest_sc_macros_test.mk
+++ b/sc/CppunitTest_sc_macros_test.mk
@@ -100,6 +100,7 @@ $(eval $(call gb_CppunitTest_set_args,sc_macros_test,\
--headless \
--protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \
-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
diff --git a/sc/qa/unit/macros-test.cxx b/sc/qa/unit/macros-test.cxx
index 067a255..a971d20 100644
--- a/sc/qa/unit/macros-test.cxx
+++ b/sc/qa/unit/macros-test.cxx
@@ -129,10 +129,10 @@ public:
CPPUNIT_TEST_SUITE(ScMacrosTest);
//enable this test if you want to play with star basic macros in unit tests
//works but does nothing useful yet
-// CPPUNIT_TEST(testStarBasic);
+ CPPUNIT_TEST(testStarBasic);
//enable if you want to hack vba support for unit tests
//does not work, still problems during loading
-// CPPUNIT_TEST(testVba);
+ CPPUNIT_TEST(testVba);
CPPUNIT_TEST_SUITE_END();
diff --git a/test/prj/d.lst b/test/prj/d.lst
index 9211e33..9ec65ba 100644
--- a/test/prj/d.lst
+++ b/test/prj/d.lst
@@ -6,3 +6,8 @@ mkdir: %_DEST%\inc\test
..\%__SRC%\lib\libtest.dll.a %_DEST%\lib\libtest.dll.a
..\inc\test\testdllapi.hxx %_DEST%\inc\test\testdllapi.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
+
diff --git a/test/user-template/user/data/registrymodifications.xcu b/test/user-template/user/data/registrymodifications.xcu
new file mode 100644
index 0000000..cdfda4a
--- /dev/null
+++ b/test/user-template/user/data/registrymodifications.xcu
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2011 Stephan Bergmann <sbergman at redhat.com> (initial
+ * developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+-->
+<oor:items xmlns:oor="http://openoffice.org/2001/registry">
+ <item oor:path="/org.openoffice.Office.Paths/Paths">
+ <node oor:name="UIConfig" oor:op="replace">
+ <node oor:name="InternalPaths">
+ <node oor:name="$(userurl)/config" oor:op="fuse"/>
+ </node>
+ </node>
+ </item>
+</oor:items>
diff --git a/test/user-template/user/registrymodifications.xcu b/test/user-template/user/registrymodifications.xcu
deleted file mode 100644
index cdfda4a..0000000
--- a/test/user-template/user/registrymodifications.xcu
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * [ Copyright (C) 2011 Stephan Bergmann <sbergman at redhat.com> (initial
- * developer) ]
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
--->
-<oor:items xmlns:oor="http://openoffice.org/2001/registry">
- <item oor:path="/org.openoffice.Office.Paths/Paths">
- <node oor:name="UIConfig" oor:op="replace">
- <node oor:name="InternalPaths">
- <node oor:name="$(userurl)/config" oor:op="fuse"/>
- </node>
- </node>
- </item>
-</oor:items>
More information about the Libreoffice-commits
mailing list