[Libreoffice-commits] .: 2 commits - lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk lotuswordpro/Module_lotuswordpro.mk lotuswordpro/Package_qa_cppunit.mk lotuswordpro/qa

Caolán McNamara caolan at kemper.freedesktop.org
Fri Apr 15 07:56:32 PDT 2011


 lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk |   62 +++++++
 lotuswordpro/Module_lotuswordpro.mk                        |    5 
 lotuswordpro/Package_qa_cppunit.mk                         |   38 ++++
 lotuswordpro/qa/cppunit/Makefile                           |   45 +++++
 lotuswordpro/qa/cppunit/makefile.mk                        |  108 -------------
 lotuswordpro/qa/cppunit/test_lotuswordpro.cxx              |    9 -
 lotuswordpro/qa/cppunit/version.map                        |   34 ----
 7 files changed, 153 insertions(+), 148 deletions(-)

New commits:
commit 748e281ad929614bb51a090ed3e9a5e31acb6334
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 15 15:56:21 2011 +0100

    remove old stuff now

diff --git a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
new file mode 100644
index 0000000..6e82fbc
--- /dev/null
+++ b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
@@ -0,0 +1,62 @@
+#*************************************************************************
+# 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
+#       Bjoern Michaelsen, Canonical Ltd. <bjoern.michaelsen at canonical.com>
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Major Contributor(s): Caolán McNamara, Red Hat, Inc. <caolanm at redhat.com>
+#
+# 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,lotuswordpro_test_lotuswordpro))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,lotuswordpro_test_lotuswordpro, \
+    lotuswordpro/qa/cppunit/test_lotuswordpro \
+))
+
+$(eval $(call gb_CppunitTest_set_args,lotuswordpro_test_lotuswordpro,\
+	--headless \
+	--invisible \
+	"-env:UNO_TYPES=$(foreach binrdb,udkapi.rdb types.rdb,\
+		file://$(if $(filter WNT,$(OS)),/)$(OUTDIR)/bin/$(binrdb))" \
+	"-env:UNO_SERVICES=$(foreach rdb,$(OUTDIR)/xml/ure/services.rdb $(WORKDIR)/CustomTarget/lotuswordpro/qa/cppunit/services.rdb,\
+		file://$(if $(filter WNT,$(OS)),/)$(rdb))" \
+	$(foreach dir,URE_INTERNAL_LIB_DIR OOO_BASE_DIR BRAND_BASE_DIR, \
+		-env:$(dir)=file://$(if $(filter WNT,$(OS)),/$(OUTDIR)/bin,$(OUTDIR)/lib)) \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,lotuswordpro_test_lotuswordpro, \
+    vcl \
+    comphelper \
+    cppuhelper \
+    cppu \
+    sal \
+    $(gb_STDLIBS) \
+))
+
+$(eval $(call gb_CppunitTest_set_include,lotuswordpro_test_lotuswordpro,\
+    $$(INCLUDE) \
+    -I$(OUTDIR)/inc/offuh \
+    -I$(OUTDIR)/inc \
+))
+
+# vim: set noet sw=4:
diff --git a/lotuswordpro/Package_qa_cppunit.mk b/lotuswordpro/Package_qa_cppunit.mk
new file mode 100644
index 0000000..acd0901
--- /dev/null
+++ b/lotuswordpro/Package_qa_cppunit.mk
@@ -0,0 +1,38 @@
+# 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. 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
+#        Bjoern Michaelsen <bjoern.michaelsen at canonical.com> (Canonical Ltd.)
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bjoern Michaelsen <bjoern.michaelsen at canonical.com> (Canonical Ltd.)
+#               , Caolán McNamara <caolanm at redhat.com> (Red Hat, Inc.)
+#
+# 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_Package_Package,lotuswordpro_qa_cppunit,$(WORKDIR)/CustomTarget/lotuswordpro/qa/cppunit))
+$(eval $(call gb_Package_add_customtarget,lotuswordpro_qa_cppunit,lotuswordpro/qa/cppunit))
+
+# dependencies that cause the CustomTarget Makefile to be called recursively for
+# (re)build
+$(eval $(call gb_CustomTarget_add_outdir_dependencies,lotuswordpro/qa/cppunit,\
+	$(foreach newcomponentfile,\
+		lotuswordpro/util/lwpfilter,\
+	$(OUTDIR)/xml/component/$(newcomponentfile).component) \
+))
+
+# vim: set noet sw=4:
diff --git a/lotuswordpro/qa/cppunit/Makefile b/lotuswordpro/qa/cppunit/Makefile
new file mode 100644
index 0000000..543bd56
--- /dev/null
+++ b/lotuswordpro/qa/cppunit/Makefile
@@ -0,0 +1,45 @@
+# 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. 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
+#        Bjoern Michaelsen <bjoern.michaelsen at canonical.com> (Canonical Ltd.)
+# Portions created by the Initial Developer are Copyright (C) 2011 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Bjoern Michaelsen <bjoern.michaelsen at canonical.com> (Canonical Ltd.)
+#               , Caolán McNamara <caolanm at redhat.com> (Red Hat, Inc.)
+#
+# 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.
+
+MYDIR := $(realpath $(dir $(firstword $(MAKEFILE_LIST))))
+
+all : services.rdb
+
+services.rdb : $(foreach newcomponentfile,\
+		lotuswordpro/util/lwpfilter,\
+	$(OUTDIR)/xml/component/$(newcomponentfile).component \
+)
+
+services.rdb :
+	echo '<?xml version="1.0"?><components xmlns="http://openoffice.org/2010/uno-components">' > $@
+	$(gb_AWK) -- \
+		'/^<\?xml version.*/ { next; } \
+		{ gsub(/vnd.sun.star.expand:\$$OOO_BASE_DIR\/program/, "vnd.sun.star.expand:$$OOO_BASE_DIR",$$0); gsub(/vnd.sun.star.expand:\$$BRAND_BASE_DIR\/program/, "vnd.sun.star.expand:$$BRAND_BASE_DIR",$$0); print; }' \
+		$^ >> $@
+	echo '</components>' >> $@
+
+.PHONY : all
+# vim: set noet sw=4 ts=4:
diff --git a/lotuswordpro/qa/cppunit/makefile.mk b/lotuswordpro/qa/cppunit/makefile.mk
deleted file mode 100644
index a7a863e..0000000
--- a/lotuswordpro/qa/cppunit/makefile.mk
+++ /dev/null
@@ -1,108 +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=lotuswordpro
-TARGET=qa_lotuswordpro
-
-ENABLE_EXCEPTIONS=TRUE
-
-my_components = qa_lwpfilter
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE :  settings.mk
-
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
-DLLPRE = # no leading "lib" on .so files
-
-# --- Libs ---------------------------------------------------------
-
-SHL1OBJS=  \
-    $(SLO)/test_lotuswordpro.obj
-
-SHL1STDLIBS= \
-     $(VCLLIB) \
-     $(COMPHELPERLIB) \
-     $(CPPUHELPERLIB) \
-     $(CPPULIB) \
-     $(SALLIB) \
-     $(CPPUNITLIB)
-
-SHL1TARGET= test_lotuswordpro
-SHL1RPATH = NONE
-SHL1IMPLIB= i$(SHL1TARGET)
-DEF1NAME=$(SHL1TARGET)
-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
-
-$(MISC)$/$(TARGET)$/types.rdb .ERRREMOVE : $(SOLARBINDIR)$/types.rdb
-    $(MKDIRHIER) $(@:d)
-    $(GNUCOPY) $? $@
-
-$(MISC)/$(TARGET)/udkapi.rdb .ERRREMOVE : $(SOLARBINDIR)$/udkapi.rdb
-    $(MKDIRHIER) $(@:d)
-    $(GNUCOPY) $? $@
-
-#Make a services.rdb with the services we know we need to get up and running
-$(MISC)/$(TARGET)/services.rdb .ERRREMOVE: $(SOLARENV)/bin/packcomponents.xslt \
-        $(MISC)/$(TARGET)/services.input \
-        $(my_components:^"$(MISC)/":+".component")
-    $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/ -o $@ \
-        $(SOLARENV)/bin/packcomponents.xslt $(MISC)/$(TARGET)/services.input
-
-$(MISC)/$(TARGET)/services.input:
-    $(MKDIRHIER) $(@:d)
-    echo \
-        '<list>$(my_components:^"<filename>":+".component</filename>")</list>' \
-        > $@
-
-test .PHONY: $(SHL1TARGETN) $(MISC)/$(TARGET)/services.rdb $(MISC)$/$(TARGET)$/types.rdb $(MISC)/$(TARGET)/udkapi.rdb
-    @echo ----------------------------------------------------------
-    @echo - start unit test \#1 on library $(SHL1TARGETN)
-    @echo ----------------------------------------------------------
-    $(CPPUNITTESTER) $(SHL1TARGETN) --headless --invisible \
-        -env:UNO_SERVICES=$(my_file)$(PWD)/$(MISC)/$(TARGET)/services.rdb \
-        -env:UNO_TYPES="$(my_file)$(PWD)/$(MISC)/$(TARGET)/types.rdb $(my_file)$(PWD)/$(MISC)/$(TARGET)/udkapi.rdb" \
-        -env:OOO_INBUILD_SHAREDLIB_DIR="$(my_file)$(PWD)/$(DLLDEST)"
diff --git a/lotuswordpro/qa/cppunit/version.map b/lotuswordpro/qa/cppunit/version.map
deleted file mode 100644
index 3308588..0000000
--- a/lotuswordpro/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:
-        *;
-};
commit ecd4bc8278736d3a68615c7ee921303f2d000775
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 15 15:54:38 2011 +0100

    port unit test to gbuild after fixing filter

diff --git a/lotuswordpro/Module_lotuswordpro.mk b/lotuswordpro/Module_lotuswordpro.mk
index 4286ab8..9a0e632 100644
--- a/lotuswordpro/Module_lotuswordpro.mk
+++ b/lotuswordpro/Module_lotuswordpro.mk
@@ -31,4 +31,9 @@ $(eval $(call gb_Module_add_targets,lotuswordpro,\
     Library_lwpft \
 ))
 
+$(eval $(call gb_Module_add_check_targets,lotuswordpro,\
+    CppunitTest_lotuswordpro_test_lotuswordpro \
+    Package_qa_cppunit \
+))
+
 # vim: set noet ts=4 sw=4:
diff --git a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
index c721fa1..681265e 100644
--- a/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
+++ b/lotuswordpro/qa/cppunit/test_lotuswordpro.cxx
@@ -26,10 +26,7 @@
  * instead of those above.
  */
 
-#include <cppunit/TestAssert.h>
-#include <cppunit/TestFixture.h>
-#include <cppunit/plugin/TestPlugIn.h>
-#include <cppunit/extensions/HelperMacros.h>
+#include <sal/cppunit.h>
 
 #include <cppuhelper/bootstrap.hxx>
 #include <comphelper/processfactory.hxx>
@@ -138,8 +135,8 @@ namespace
 
     void LotusWordProTest::test()
     {
-        recursiveScan(m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/data/pass/")), true);
-        recursiveScan(m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/data/fail/")), false);
+        recursiveScan(m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/qa/cppunit/data/pass")), true);
+        recursiveScan(m_aPWDURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/qa/cppunit/data/fail/")), false);
 
         printf("LotusWordPro: tested %d files\n", m_nLoadedDocs);
     }


More information about the Libreoffice-commits mailing list