[Libreoffice-commits] .: starmath/CppunitTest_starmath_qa_cppunit.mk starmath/Module_starmath.mk starmath/qa

David Tardon dtardon at kemper.freedesktop.org
Sun Apr 24 03:10:54 PDT 2011


 starmath/CppunitTest_starmath_qa_cppunit.mk |  111 +++++++++++++++++++++
 starmath/Module_starmath.mk                 |    4 
 starmath/qa/cppunit/makefile.mk             |  147 ----------------------------
 starmath/qa/cppunit/test_starmath.cxx       |    7 -
 starmath/qa/cppunit/version.map             |   34 ------
 5 files changed, 116 insertions(+), 187 deletions(-)

New commits:
commit 3aeb6895662ba49c74d94f44fc0c86a5a1e8ae0e
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Apr 24 12:00:35 2011 +0200

    reenable unit test

diff --git a/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk
new file mode 100644
index 0000000..8d6a95e
--- /dev/null
+++ b/starmath/CppunitTest_starmath_qa_cppunit.mk
@@ -0,0 +1,111 @@
+# 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.
+#
+# The Initial Developer of the Original Code is
+#       David Tardon, Red Hat Inc. <dtardon at redhat.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s):
+#
+# 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.
+
+$(eval $(call gb_CppunitTest_CppunitTest,starmath_qa_cppunit))
+
+$(eval $(call gb_CppunitTest_set_include,starmath_qa_cppunit,\
+    $$(INCLUDE) \
+    -I$(realpath $(SRCDIR)/starmath/inc) \
+    -I$(realpath $(SRCDIR)/starmath/inc/pch) \
+    -I$(OUTDIR)/inc \
+    -I$(OUTDIR)/inc/offuh \
+))
+
+$(eval $(call gb_CppunitTest_set_defs,starmath_qa_cppunit,\
+    $$(DEFS) \
+    -DSMDLL \
+))
+
+$(eval $(call gb_CppunitTest_add_library_objects,starmath_qa_cppunit,\
+    sm \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,starmath_qa_cppunit,\
+    comphelper \
+    cppu \
+    cppuhelper \
+    editeng \
+    i18nisolang1 \
+    i18npaper \
+    sal \
+    sfx \
+    sot \
+    svl \
+    svt \
+    svxcore \
+    svx \
+    tk \
+    tl \
+    utl \
+    vcl \
+    xo \
+    $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,starmath_qa_cppunit,\
+    starmath/qa/cppunit/test_nodetotextvisitors \
+    starmath/qa/cppunit/test_starmath \
+))
+
+$(eval $(call gb_CppunitTest_uses_ure,starmath_qa_cppunit))
+
+$(eval $(call gb_CppunitTest_add_type_rdbs,starmath_qa_cppunit,\
+    types \
+))
+
+$(eval $(call gb_CppunitTest_add_service_rdbs,starmath_qa_cppunit,\
+    starmath_qa_cppunit \
+))
+
+$(eval $(call gb_CppunitTest_set_args,starmath_qa_cppunit,\
+    --headless \
+    --invisible \
+))
+
+$(eval $(call gb_RdbTarget_RdbTarget,starmath_qa_cppunit))
+
+$(eval $(call gb_RdbTarget_add_components,starmath_qa_cppunit,\
+    framework/util/fwk \
+    toolkit/util/tk \
+    sfx2/util/sfx \
+))
+
+$(eval $(call gb_RdbTarget_add_old_components,starmath_qa_cppunit,\
+    configmgr \
+    i18npool \
+    mcnttype \
+    vcl \
+))
+
+ifeq ($(strip $(OS)),WNT)
+$(eval $(call gb_RdbTarget_add_old_components,starmath_qa_cppunit,\
+    ftransl \
+    sysdtrans \
+))
+endif
+
+# vim: set noet sw=4:
diff --git a/starmath/Module_starmath.mk b/starmath/Module_starmath.mk
index 9f7de2d..d9bc48d 100644
--- a/starmath/Module_starmath.mk
+++ b/starmath/Module_starmath.mk
@@ -29,6 +29,10 @@ $(eval $(call gb_Module_add_targets,sm,\
     Package_uiconfig \
 ))
 
+$(eval $(call gb_Module_add_check_targets,sm,\
+    CppunitTest_starmath_qa_cppunit \
+))
+
 $(eval $(call gb_Module_add_subsequentcheck_targets,sm,\
     JunitTest_starmath_unoapi \
 ))
diff --git a/starmath/qa/cppunit/makefile.mk b/starmath/qa/cppunit/makefile.mk
deleted file mode 100644
index a61a13e..0000000
--- a/starmath/qa/cppunit/makefile.mk
+++ /dev/null
@@ -1,147 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=../..
-PRJNAME=starmath
-TARGET=qa_cppunit
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE :  settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-
-# --- Libs ---------------------------------------------------------
-
-SHL1OBJS=  \
-    $(SLO)/test_starmath.obj \
-    $(SLO)/test_nodetotextvisitors.obj
-
-
-SHL1STDLIBS= \
-    $(CPPUNITLIB) \
-    $(EDITENGLIB) \
-    $(SVXCORELIB) \
-    $(SVXLIB) \
-    $(SFX2LIB) \
-    $(XMLOFFLIB) \
-    $(SVTOOLLIB) \
-    $(TKLIB) \
-    $(VCLLIB) \
-    $(SVLLIB)   \
-    $(I18NPAPERLIB)     \
-    $(SOTLIB) \
-    $(UNOTOOLSLIB) \
-    $(TOOLSLIB) \
-    $(COMPHELPERLIB) \
-    $(CPPUHELPERLIB) \
-    $(CPPULIB) \
-    $(SALLIB)
-
-SHL1LIBS=$(SLB)$/starmath.lib
-
-SHL1TARGET= test_starmath
-SHL1RPATH = NONE
-SHL1IMPLIB= i$(SHL1TARGET)
-# SHL1DEF= $(MISC)/$(SHL1TARGET).def
-DEF1NAME=$(SHL1TARGET)
-# DEF1EXPORTFILE= export.exp
-SHL1VERSIONMAP= version.map
-
-# --- All object files ---------------------------------------------
-
-SLOFILES= \
-    $(SHL1OBJS) \
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE :  target.mk
-
-.IF "$(OS)" == "WNT"
-my_file = file:///
-.ELSE
-my_file = file://
-.END
-
-ALLTAR: test
-
-test_components = \
-    component/framework/util/fwk \
-    component/toolkit/util/tk \
-    component/sfx2/util/sfx \
-    configmgr \
-    vcl \
-    mcnttype \
-    i18npool
-.IF "$(OS)" == "WNT"
-test_components += \
-    sysdtrans \
-    ftransl
-.ENDIF
-
-# Make a services.rdb with the services we know we need to get up and running
-$(MISC)/services.input : makefile.mk
-    $(MKDIRHIER) $(@:d)
-    echo \
-        '<list>$(test_components:^"<filename>":+".component</filename>")</list>' \
-        > $@
-
-$(MISC)/$(TARGET)/services.rdb .ERRREMOVE : makefile.mk $(MISC)/services.input
-    $(MKDIRHIER) $(@:d)
-    $(XSLTPROC) --nonet --stringparam prefix $(SOLARXMLDIR)/ -o $@.tmp \
-        $(SOLARENV)/bin/packcomponents.xslt $(MISC)/services.input
-    cat $(MISC)/$@.tmp | sed 's|/program/|/|g' > $@
-
-#Tweak things so that we use the .res files in the solver
-STAR_RESOURCEPATH:=$(PWD)/$(BIN)$(PATH_SEPERATOR)$(SOLARBINDIR)
-.EXPORT : STAR_RESOURCEPATH
-
-.IF "$(OS)" != "DRAGONFLY"
-
-test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb
-    @echo ----------------------------------------------------------
-    @echo - start unit test \#1 on library $(SHL1TARGETN)
-    @echo ----------------------------------------------------------
-    $(CPPUNITTESTER) $(SHL1TARGETN) --headless --invisible \
-        '-env:UNO_TYPES=$(my_file)$(SOLARBINDIR)/udkapi.rdb $(my_file)$(SOLARBINDIR)$/types.rdb' \
-        '-env:UNO_SERVICES=$(my_file)$(SOLARXMLDIR)/ure/services.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb'\
-        -env:URE_INTERNAL_LIB_DIR="$(my_file)$(SOLARSHAREDBIN)" \
-        -env:OOO_BASE_DIR="$(my_file)$(SOLARSHAREDBIN)" \
-        -env:BRAND_BASE_DIR="$(my_file)$(SOLARSHAREDBIN)"
-
-.ELSE
-
-test .PHONY: $(SHL1TARGETN)
-    @echo ----------------------------------------------------------
-    @echo - WARNING!!, test disabled on your platform
-    @echo - Please test manually, and enable if it works
-    @echo ----------------------------------------------------------
-
-.ENDIF
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index 310f014..f502089 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -32,13 +32,8 @@
 #include <windows.h>
 #endif
 
-#include <cppunit/TestSuite.h>
-#include <cppunit/TestFixture.h>
-#include <cppunit/TestCase.h>
-#include <cppunit/plugin/TestPlugIn.h>
-#include <cppunit/extensions/HelperMacros.h>
-
 #include <sal/config.h>
+#include <sal/cppunit.h>
 
 #include <cppuhelper/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
diff --git a/starmath/qa/cppunit/version.map b/starmath/qa/cppunit/version.map
deleted file mode 100644
index 3308588..0000000
--- a/starmath/qa/cppunit/version.map
+++ /dev/null
@@ -1,34 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org.  If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-UDK_3_0_0 {
-    global:
-        cppunitTestPlugIn;
-
-    local:
-        *;
-};


More information about the Libreoffice-commits mailing list