You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2015/08/30 10:26:13 UTC
svn commit: r1700093 [1/3] - in /openoffice/trunk/main/cppu: prj/build.lst
qa/main.cxx qa/makefile.mk qa/test_any.cxx qa/test_recursion.cxx
qa/test_reference.cxx qa/test_unotype.cxx
Author: damjan
Date: Sun Aug 30 08:26:13 2015
New Revision: 1700093
URL: http://svn.apache.org/r1700093
Log:
#i125003# migrate main/cppu from cppunit to Google Test and run it on every build.
Added:
openoffice/trunk/main/cppu/qa/main.cxx
Modified:
openoffice/trunk/main/cppu/prj/build.lst
openoffice/trunk/main/cppu/qa/makefile.mk
openoffice/trunk/main/cppu/qa/test_any.cxx
openoffice/trunk/main/cppu/qa/test_recursion.cxx
openoffice/trunk/main/cppu/qa/test_reference.cxx
openoffice/trunk/main/cppu/qa/test_unotype.cxx
Modified: openoffice/trunk/main/cppu/prj/build.lst
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cppu/prj/build.lst?rev=1700093&r1=1700092&r2=1700093&view=diff
==============================================================================
--- openoffice/trunk/main/cppu/prj/build.lst (original)
+++ openoffice/trunk/main/cppu/prj/build.lst Sun Aug 30 08:26:13 2015
@@ -10,3 +10,4 @@ cu cppu\source\UnsafeBridge nmake -
cu cppu\source\AffineBridge nmake - all cu_AffineBridge cu_inc NULL
cu cppu\source\LogBridge nmake - all cu_LogBridge cu_inc NULL
cu cppu\util nmake - all cu_util cu_thpool cu_typelib cu_cppu cu_uno cu_helper_purpenv cu_UnsafeBridge cu_AffineBridge cu_LogBridge NULL
+cu cppu\qa nmake - all cu_qa cu_inc cu_thpool cu_typelib cu_cppu cu_uno cu_helper_purpenv cu_UnsafeBridge cu_AffineBridge cu_LogBridge NULL
Added: openoffice/trunk/main/cppu/qa/main.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cppu/qa/main.cxx?rev=1700093&view=auto
==============================================================================
--- openoffice/trunk/main/cppu/qa/main.cxx (added)
+++ openoffice/trunk/main/cppu/qa/main.cxx Sun Aug 30 08:26:13 2015
@@ -0,0 +1,28 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+#include "gtest/gtest.h"
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+}
Modified: openoffice/trunk/main/cppu/qa/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/cppu/qa/makefile.mk?rev=1700093&r1=1700092&r2=1700093&view=diff
==============================================================================
--- openoffice/trunk/main/cppu/qa/makefile.mk (original)
+++ openoffice/trunk/main/cppu/qa/makefile.mk Sun Aug 30 08:26:13 2015
@@ -29,47 +29,42 @@ ENABLE_EXCEPTIONS := TRUE
.INCLUDE: settings.mk
-CFLAGSCXX += $(CPPUNIT_CFLAGS)
+.IF "$(ENABLE_UNIT_TESTS)" != "YES"
+all:
+ @echo unit tests are disabled. Nothing to do.
-DLLPRE = # no leading "lib" on .so files
+.ELSE
-INCPRE += $(MISC)$/$(TARGET)$/inc
-SHL1TARGET = $(TARGET)_any
-SHL1OBJS = $(SLO)$/test_any.obj
-SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
-SHL1VERSIONMAP = version.map
-SHL1IMPLIB = i$(SHL1TARGET)
-DEF1NAME = $(SHL1TARGET)
-
-SHL2TARGET = $(TARGET)_unotype
-SHL2OBJS = $(SLO)$/test_unotype.obj
-SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
-SHL2VERSIONMAP = version.map
-SHL2IMPLIB = i$(SHL2TARGET)
-DEF2NAME = $(SHL2TARGET)
-
-SHL3TARGET = $(TARGET)_reference
-SHL3OBJS = $(SLO)$/test_reference.obj
-SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
-SHL3VERSIONMAP = version.map
-SHL3IMPLIB = i$(SHL3TARGET)
-DEF3NAME = $(SHL3TARGET)
-
-SHL4TARGET = $(TARGET)_recursion
-SHL4OBJS = $(SLO)$/test_recursion.obj
-SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
-SHL4VERSIONMAP = version.map
-SHL4IMPLIB = i$(SHL4TARGET)
-DEF4NAME = $(SHL4TARGET)
+INCPRE += $(MISC)$/$(TARGET)$/inc
-SLOFILES = $(SHL1OBJS) $(SHL2OBJS) $(SHL3OBJS) $(SHL4OBJS)
+APP1TARGET = $(TARGET)_any
+APP1OBJS = $(SLO)$/test_any.obj $(SLO)$/main.obj
+APP1STDLIBS = $(CPPULIB) $(GTESTLIB) $(TESTSHL2LIB) $(SALLIB)
+APP1RPATH = NONE
+APP1TEST = enabled
+
+APP2TARGET = $(TARGET)_unotype
+APP2OBJS = $(SLO)$/test_unotype.obj $(SLO)$/main.obj
+APP2STDLIBS = $(CPPULIB) $(GTESTLIB) $(TESTSHL2LIB) $(SALLIB)
+APP2RPATH = NONE
+APP2TEST = enabled
+
+APP3TARGET = $(TARGET)_reference
+APP3OBJS = $(SLO)$/test_reference.obj $(SLO)$/main.obj
+APP3STDLIBS = $(CPPULIB) $(GTESTLIB) $(TESTSHL2LIB) $(SALLIB)
+APP3RPATH = NONE
+APP3TEST = enabled
+
+APP4TARGET = $(TARGET)_recursion
+APP4OBJS = $(SLO)$/test_recursion.obj $(SLO)$/main.obj
+APP4STDLIBS = $(CPPULIB) $(GTESTLIB) $(TESTSHL2LIB) $(SALLIB)
+APP4RPATH = NONE
+APP4TEST = enabled
.INCLUDE: target.mk
-ALLTAR: test
-
-$(SHL1OBJS): $(MISC)$/$(TARGET).cppumaker.flag
+$(APP1OBJS): $(MISC)$/$(TARGET).cppumaker.flag
$(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb
- $(MKDIRHIER) $(MISC)$/$(TARGET)$/inc
@@ -85,8 +80,4 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl
- $(MKDIR) $(MISC)$/$(TARGET)
$(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $<
-test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN)
- $(TESTSHL2) $(SHL1TARGETN)
- $(TESTSHL2) $(SHL2TARGETN)
- $(TESTSHL2) $(SHL3TARGETN)
- $(TESTSHL2) $(SHL4TARGETN)
+.ENDIF # "$(ENABLE_UNIT_TESTS)" != "YES"
\ No newline at end of file