[Libreoffice-commits] core.git: 2 commits - smoketest/Module_smoketest.mk solenv/bin solenv/gbuild

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Thu Jan 23 03:55:46 PST 2014


 smoketest/Module_smoketest.mk |    4 ++++
 solenv/bin/unittest-failed.sh |   23 +++++++++++++++++++++++
 solenv/gbuild/CppunitTest.mk  |    9 +--------
 solenv/gbuild/PythonTest.mk   |    4 ++--
 4 files changed, 30 insertions(+), 10 deletions(-)

New commits:
commit 1c3f994c515e4f227e0b052d18899a897c042013
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Thu Jan 23 12:54:30 2014 +0100

    smoketest cant work without extensions
    
    Change-Id: I58af85205cce89c2eff3db24a477171ce39d47dc

diff --git a/smoketest/Module_smoketest.mk b/smoketest/Module_smoketest.mk
index 798b787..7195fda 100644
--- a/smoketest/Module_smoketest.mk
+++ b/smoketest/Module_smoketest.mk
@@ -18,11 +18,13 @@ $(eval $(call gb_Module_add_targets,smoketest,\
 ))
 
 ifneq ($(ENABLE_JAVA),)
+ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
 $(eval $(call gb_Module_add_targets,smoketest,\
 	Extension_TestExtension \
 	Jar_TestExtension \
 ))
 endif
+endif
 
 ifeq ($(OS),LINUX)
 $(eval $(call gb_Module_add_check_targets,smoketest,\
@@ -31,10 +33,12 @@ $(eval $(call gb_Module_add_check_targets,smoketest,\
 endif
 
 ifneq (MACOSX/TRUE,$(OS)/$(ENABLE_MACOSX_SANDBOX))
+ifneq ($(filter EXTENSIONS,$(BUILD_TYPE)),)
 $(eval $(call gb_Module_add_subsequentcheck_targets,smoketest,\
 	CppunitTest_smoketest \
 ))
 endif
+endif
 
 endif
 
commit b5e988ffc121147c052cf9d6992afc35db3df49b
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Thu Jan 23 12:51:38 2014 +0100

    make unittest failure foo a script
    
    - first of all, code from CppunitTest.mk used from PythonTest.mk is bad
      anyway
    - also, this shortens and removes noise from the commandline executed
    
    Change-Id: I6c5b41a0c497b766c3293aeec5c59240aa3ef37c

diff --git a/solenv/bin/unittest-failed.sh b/solenv/bin/unittest-failed.sh
new file mode 100755
index 0000000..35db6dc
--- /dev/null
+++ b/solenv/bin/unittest-failed.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# -*- Mode: sh; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   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 .
+
+printf '\nError: a unit test failed, please do one of:\n\nexport DEBUGCPPUNIT=TRUE            # for exception catching\nexport CPPUNITTRACE="gdb --args" # for interactive debugging on linux\nexport CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio\nexport VALGRIND=memcheck            # for memory checking\n\nand retry using: make %sTest_%s\n\n' $1 $2
+exit 1
+
+# vim: set et sw=4:
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index b2c268d..ba3ddac 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -17,15 +17,8 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-
 # CppunitTest class
 
-# $(1): "Cppunit" or "Python"
-# $(2): the name of the unit test that failed
-define gb_UNIT_FAILED_MSG
-printf '\nError: a unit test failed, please do one of:\n\nexport DEBUGCPPUNIT=TRUE            # for exception catching\nexport CPPUNITTRACE="gdb --args" # for interactive debugging on linux\nexport CPPUNITTRACE="\"[full path to devenv.exe]\" /debugexe" # for interactive debugging in Visual Studio\nexport VALGRIND=memcheck            # for memory checking\n\nand retry using: make %sTest_%s\n\n' $(1) $(2)
-endef
-
 ifeq ($(strip $(DEBUGCPPUNIT)),TRUE)
 gb_CppunitTest_GDBTRACE := gdb -nx -ex "add-auto-load-safe-path $(INSTDIR)" --command=$(SRCDIR)/solenv/bin/gdbtrycatchtrace-stdout -return-child-result --args
 else ifneq ($(strip $(CPPUNITTRACE)),)
@@ -96,7 +89,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
 			|| ($(if $(value gb_CppunitTest_postprocess), \
 					RET=$$?; \
 					$(call gb_CppunitTest_postprocess,$(gb_CppunitTest_CPPTESTCOMMAND),$@.core,$$RET) >> $@.log 2>&1;) \
-				cat $@.log; $(call gb_UNIT_FAILED_MSG,Cppunit,$*); false))))
+				cat $@.log; $(SRCDIR)/solenv/bin/unittest-failed.sh Cppunit $*))))
 
 define gb_CppunitTest_CppunitTest
 $(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest_get_linktarget,$(1)))
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk
index 45d217f..76af68e 100644
--- a/solenv/gbuild/PythonTest.mk
+++ b/solenv/gbuild/PythonTest.mk
@@ -51,10 +51,10 @@ $(call gb_PythonTest_get_target,%) :
 			$(MODULES) \
 		$(if $(gb_CppunitTest__interactive),, \
 			> $@.log 2>&1 \
-			|| (cat $@.log && $(call gb_UNIT_FAILED_MSG,Python,$*) \
+			|| (cat $@.log \
 				$(if $(value gb_CppunitTest_postprocess), \
 					&& $(call gb_CppunitTest_postprocess,$(gb_PythonTest_EXECUTABLE_GDB),$@.core,139)) \
-				&& false))))
+				&& $(SRCDIR)/solenv/bin/unittest-failed.sh Python $*))))
 
 # always use udkapi and URE services
 define gb_PythonTest_PythonTest


More information about the Libreoffice-commits mailing list