ooo-build r11691 - in trunk: . patches/src680 patches/test
- From: michael svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11691 - in trunk: . patches/src680 patches/test
- Date: Fri, 22 Feb 2008 23:49:41 +0000 (GMT)
Author: michael
Date: Fri Feb 22 23:49:41 2008
New Revision: 11691
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11691&view=rev
Log:
2008-02-22 Michael Meeks <michael meeks novell com>
* patches/src680/unit-deliver.diff,
* patches/src680/unit-sc.diff: latest & greatest.
* patches/src680/apply: add UnitExperimental.
Added:
trunk/patches/src680/unit-sc.diff
Modified:
trunk/ChangeLog
trunk/patches/src680/apply
trunk/patches/src680/unit-deliver.diff
trunk/patches/test/built-in-unit-test.diff
Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply (original)
+++ trunk/patches/src680/apply Fri Feb 22 23:49:41 2008
@@ -2046,9 +2046,11 @@
unittesting-xmlscript.diff
unittesting-xmlsecurity.diff
-# experimental hacks !
+[ UnitExperimental ]
+# experimental hacks ...
unit-deliver.diff
unit-comphelper.diff
+unit-sc.diff
[ ReducedDefaults ]
SectionOwner => jholesov
Modified: trunk/patches/src680/unit-deliver.diff
==============================================================================
--- trunk/patches/src680/unit-deliver.diff (original)
+++ trunk/patches/src680/unit-deliver.diff Fri Feb 22 23:49:41 2008
@@ -4,7 +4,7 @@
retrieving revision 1.124
diff -u -p -u -r1.124 deliver.pl
--- solenv/bin/deliver.pl 26 Nov 2007 19:00:17 -0000 1.124
-+++ solenv/bin/deliver.pl 20 Feb 2008 18:32:16 -0000
++++ solenv/bin/deliver.pl 22 Feb 2008 23:23:53 -0000
@@ -40,6 +40,8 @@ eval 'exec perl -wS $0 ${1+"$@"}'
# deliver.pl - copy from module output tree to solver
#
@@ -121,19 +121,16 @@
+{
+ my $component = shift;
+
-+ my $solarlib = $ENV{SOLARVER}."/".$ENV{INPATH}."/lib";
-+ my $servicesfile = "$solarlib/services.rdb";
++ my $servicesfile = "$dest/lib$ext/unit-$module.rdb";
+ my @regcompoutput = ();
+ my $regcomp = get_regcomp();
+
+ my $filestring = make_file_url($component);
+
+ my $systemcall = "$installer::globals::wrapcmd $regcomp " .
-+ "-register -r ".fix_cygwin_path($servicesfile).
++ "-register -r " . fix_cygwin_path($servicesfile) .
+ " -c " . $installer::globals::quote . $filestring . $installer::globals::quote .
-+ " 2\>\&1 |";
-+
-+# " -wop=" . $installer::globals::quote . $allvariableshashref->{'NATIVESERVICESURLPREFIX'} . $installer::globals::quote .
++ " -wop 2\>\&1 |";
+
+ open (REG, "$systemcall");
+ while (<REG>) {push(@regcompoutput, $_); }
@@ -141,6 +138,9 @@
+
+ my $returnvalue = $?; # $? contains the return value of the systemcall
+
++ print "command: $systemcall";
++ print "output: @regcompoutput";
++
+ # cf. cpputools/source/registercomponent/registercomponent.cxx
+ if ($returnvalue == 256) {
+ # has no component_ methods (?)
@@ -152,8 +152,8 @@
+ print "registered component: $component\n" if !$opt_silent;
+ } elsif (!$opt_silent) {
+ print "Warning: registration failed abnormally with code: $returnvalue\n";
-+ print "command: $systemcall";
-+ print "output: @regcompoutput";
++# print "command: $systemcall";
++# print "output: @regcompoutput";
+ }
+}
+
Added: trunk/patches/src680/unit-sc.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/unit-sc.diff Fri Feb 22 23:49:41 2008
@@ -0,0 +1,244 @@
+--- /dev/null 2007-09-21 22:50:58.000000000 +0100
++++ sc/qa/unit/ucalc.cxx 2008-02-21 11:02:00.000000000 +0000
+@@ -0,0 +1,131 @@
++// TODO ...
++// Remove: Foo killed exception ! and re-test ...
++// deliver.pl
++// don't call regcomp if we don't have it.
++
++#include "sal/config.h"
++#include <comphelper/unitbootstrap.hxx>
++#include "vcl/svapp.hxx"
++#include <scdll.hxx>
++#include <document.hxx>
++#include <compiler.hxx>
++#include "cppunit/simpleheader.hxx"
++
++#define CATCH_FAIL(msg) \
++ catch (const css::uno::Exception &e) { \
++ t_print ("msg '%s'\n", rtl::OUStringToOString (e.Message, RTL_TEXTENCODING_UTF8).getStr()); \
++ CPPUNIT_FAIL( msg ); \
++ throw; \
++ }
++
++class Test: public CppUnit::TestFixture {
++ UnitBootstrap *mpUnitBootstrap;
++public:
++ Test();
++ virtual ~Test();
++
++ // per-test init/teardown
++ // virtual void setUp();
++ // virtual void tearDown();
++
++ // tests
++ void createDocument();
++ void testCompiler();
++
++ CPPUNIT_TEST_SUITE(Test);
++ CPPUNIT_TEST(createDocument);
++ CPPUNIT_TEST(testCompiler);
++ CPPUNIT_TEST_SUITE_END();
++
++private:
++};
++
++//void Test::setUp()
++Test::Test()
++{
++ fprintf (stderr, "Setup\n");
++ mpUnitBootstrap = new UnitBootstrap(getForwardString());
++
++ InitVCL (mpUnitBootstrap->getMSF());
++
++ ScDLL::Init();
++}
++
++//void Test::tearDown()
++Test::~Test()
++{
++ fprintf (stderr, "tear down\n");
++ DeInitVCL ();
++
++ delete mpUnitBootstrap;
++}
++
++static ScDocument *createSimpleDoc()
++{
++ ScDocument *doc = new ScDocument();
++
++ rtl::OUString aTabName = rtl::OUString::createFromAscii ("foo");
++ CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet",
++ doc->InsertTab (0, aTabName));
++
++ return doc;
++}
++
++void Test::createDocument()
++{
++ ScDocument *doc = createSimpleDoc();
++
++ double val = 1;
++ doc->SetValue (0, 0, 0, val);
++ doc->SetValue (0, 1, 0, val);
++ doc->SetString (0, 2, 0, rtl::OUString::createFromAscii ("=SUM(A1:A2)"));
++ doc->CalcAll();
++ double result;
++ doc->GetValue (0, 2, 0, result);
++ fprintf (stderr, "one plus one = %g\n", result);
++ CPPUNIT_ASSERT_MESSAGE ("calculation failed", result == 2.0);
++
++ delete doc;
++}
++
++void Test::testCompiler()
++{
++ ScDocument *doc = createSimpleDoc();
++ ScAddress aA1;
++ ScCompiler *pComp = new ScCompiler (doc, aA1);
++
++ static const struct {
++ const char *pStr;
++ ScAddress::Convention eConv;
++ bool bValid;
++ } tests[] = {
++// OO.o style
++ { "=SUM(A1:A2)", ScAddress::CONV_OOO, true },
++ { "=SUM(A1:A2;A1:A2)", ScAddress::CONV_OOO, true },
++// R1C1 tests
++ { "=SUM(R1C1:R2C2)", ScAddress::CONV_XL_R1C1, true },
++ { "=SUM(R-1C-1:R-2C-2)", ScAddress::CONV_XL_R1C1, false },
++ };
++
++ pComp->SetCompileEnglish (true);
++ for (unsigned int i = 0; i < sizeof (tests) / sizeof(tests[0]); i++)
++ {
++ ScTokenArray *pToks = pComp->CompileString
++ (rtl::OUString::createFromAscii (tests[i].pStr), tests[i].eConv);
++ if (!pToks->GetError() != !!tests[i].bValid)
++ {
++ t_print ("unexpected parsing %s with formula '%s'\n",
++ tests[i].bValid ? "failure" : "success",
++ tests[i].pStr);
++ CPPUNIT_ASSERT_MESSAGE ("unexpected parsing error", false);
++ }
++ delete pToks;
++ }
++
++ delete pComp;
++ delete doc;
++}
++
++CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests");
++
++NOADDITIONAL;
+--- /dev/null 2007-09-21 22:50:58.000000000 +0100
++++ sc/qa/unit/export.map 2007-11-23 13:57:51.000000000 +0000
+@@ -0,0 +1,7 @@
++UDK_3.0 {
++ global:
++ registerAllTestFunction;
++
++ local:
++ *;
++};
+--- /dev/null 2007-09-21 22:50:58.000000000 +0100
++++ sc/qa/unit/makefile.mk 2008-02-22 18:24:04.000000000 +0000
+@@ -0,0 +1,97 @@
++#*************************************************************************
++#
++# OpenOffice.org - a multi-platform office productivity suite
++#
++# $RCSfile: makefile.mk,v $
++#
++# $Revision: 1.2 $
++#
++# last change: $Author: ihi $ $Date: 2007/11/23 13:58:12 $
++#
++# The Contents of this file are made available subject to
++# the terms of GNU Lesser General Public License Version 2.1.
++#
++#
++# GNU Lesser General Public License Version 2.1
++# =============================================
++# Copyright 2007 by Sun Microsystems, Inc.
++# 901 San Antonio Road, Palo Alto, CA 94303, USA
++#
++# This library is free software; you can redistribute it and/or
++# modify it under the terms of the GNU Lesser General Public
++# License version 2.1, as published by the Free Software Foundation.
++#
++# This library is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++# Lesser General Public License for more details.
++#
++# You should have received a copy of the GNU Lesser General Public
++# License along with this library; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++# MA 02111-1307 USA
++#
++#*************************************************************************
++
++PRJ := ..$/..
++PRJNAME := configmgr
++TARGET := qa_unit
++
++ENABLE_EXCEPTIONS := TRUE
++
++.INCLUDE: settings.mk
++
++DLLPRE = # no leading "lib" on .so files
++
++SHL1TARGET = $(TARGET)
++SHL1OBJS = $(SLO)$/ucalc.obj
++SHL1STDLIBS= \
++ $(BASICLIB) \
++ $(SFXLIB) \
++ $(SVTOOLLIB) \
++ $(SVLLIB) \
++ $(SVXLIB) \
++ $(GOODIESLIB) \
++ $(BASEGFXLIB) \
++ $(VCLLIB) \
++ $(CPPULIB) \
++ $(CPPUHELPERLIB) \
++ $(COMPHELPERLIB) \
++ $(UCBHELPERLIB) \
++ $(TKLIB) \
++ $(VOSLIB) \
++ $(SALLIB) \
++ $(TOOLSLIB) \
++ $(I18NUTILLIB) \
++ $(I18NISOLANGLIB) \
++ $(UNOTOOLSLIB) \
++ $(SOTLIB) \
++ $(XMLOFFLIB) \
++ $(DBTOOLSLIB) \
++ $(AVMEDIALIB) \
++ $(CPPUNITLIB) \
++ $(UNITBOOTSTRAPLIB)
++SHL1IMPLIB = i$(SHL1TARGET)
++SHL1LIBS=$(SLB)$/scalc3.lib $(SLB)$/scalc3c.lib
++SHL1VERSIONMAP = export.map
++DEF1NAME = $(SHL1TARGET)
++
++.INCLUDE: target.mk
++
++ALLTAR: test
++
++USERDIR=$(OUT)$/unit
++
++$(USERDIR):
++ $(RM) -rf $(USERDIR)
++ $(COPY) $(COPYRECURSE) $(SOLARXMLDIR)$/unit-skel $(USERDIR)
++
++$(USERDIR)$/$(TARGET).rdb $(USERDIR)$/mergelist .ERRREMOVE: $(USERDIR)
++ echo "$(USERDIR)$/$(TARGET).rdb / $(SOLARBINDIR)$/types.rdb " > $(USERDIR)$/mergelist
++ $(FIND) $(SOLARLIBDIR) -name "unit-*.rdb" >> $(USERDIR)$/mergelist
++ regmerge @$(USERDIR)$/mergelist
++
++test .PHONY: $(SHL1TARGETN) $(USERDIR)$/$(TARGET).rdb
++ testshl2 $(SHL1TARGETN) -forward "$(USERDIR)$/$(TARGET).rdb#$(USERDIR)"
++ $(RM) -rf $(USERDIR)
++
Modified: trunk/patches/test/built-in-unit-test.diff
==============================================================================
--- trunk/patches/test/built-in-unit-test.diff (original)
+++ trunk/patches/test/built-in-unit-test.diff Fri Feb 22 23:49:41 2008
@@ -1,23 +1,3 @@
-Index: configmgr/qa/unit/makefile.mk
-===================================================================
-RCS file: /cvs/util/configmgr/qa/unit/makefile.mk,v
-retrieving revision 1.2
-diff -u -p -u -r1.2 makefile.mk
---- configmgr/qa/unit/makefile.mk 23 Nov 2007 13:58:12 -0000 1.2
-+++ configmgr/qa/unit/makefile.mk 18 Feb 2008 17:06:43 -0000
-@@ -58,11 +58,7 @@ ALLTAR: test
-
- $(MISC)$/$(TARGET).rdb .ERRREMOVE:
- $(COPY) $(SOLARBINDIR)$/types.rdb $@
-- regcomp -register -r $@ -c $(subst,$/,/ $(DLLDEST)$/configmgr2.uno$(DLLPOST))
-- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/typeconverter.uno$(DLLPOST))
-- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/sax.uno$(DLLPOST))
-- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/simplereg.uno$(DLLPOST))
-- regcomp -register -r $@ -c $(subst,$/,/ $(SOLARLIBDIR)/streams.uno$(DLLPOST))
-+ regmerge $@ / $(SOLARLIBDIR)$/services.rdb
-
- test .PHONY: $(SHL1TARGETN) $(MISC)$/$(TARGET).rdb
- testshl2 $(SHL1TARGETN) -forward "$(MISC)$/$(TARGET).rdb#$(PWD)$/$(MISC)$/$(TARGET).registry"
Index: configmgr/source/backend/layermerge.cxx
===================================================================
RCS file: /cvs/util/configmgr/source/backend/layermerge.cxx,v
@@ -192,7 +172,7 @@
+ } elsif ($returnvalue == 0) {
+ print "registered component: $component\n" if !$opt_silent;
+ } elsif (!$opt_silent) {
-+ print "Warning: registraiton failed abnormally with code: $returnvalue\n";
++ print "Warning: registration failed abnormally with code: $returnvalue\n";
+ print "command: $systemcall";
+ print "output: @regcompoutput";
+ }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]