[Libreoffice-commits] .: 2 commits - jurt/CustomTarget_test_urp.mk ridljar/CustomTarget_javamaker.mk testtools/CustomTarget_bridgetest_javamaker.mk testtools/InternalUnoApi_bridgetest.mk testtools/source touch/CustomTarget_touch_javamaker.mk

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 08:00:28 PST 2012


 jurt/CustomTarget_test_urp.mk                                                      |    1 
 ridljar/CustomTarget_javamaker.mk                                                  |    1 
 testtools/CustomTarget_bridgetest_javamaker.mk                                     |    1 
 testtools/InternalUnoApi_bridgetest.mk                                             |    4 
 testtools/source/bridgetest/idl/com/sun/star/test/performance/XPerformanceTest.idl |  130 ++++++++++
 touch/CustomTarget_touch_javamaker.mk                                              |    1 
 6 files changed, 138 insertions(+)

New commits:
commit 6111068d52a3d60a326866a2bccc998f50b66398
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Nov 28 16:43:18 2012 +0100

    testtools: add com.sun.star.test.performance.XPerformanceTest ...
    
    ... back, which was removed from udkapi in
    771914ab1482af600b11dfe789182604802d1046.
    
    Change-Id: I266f2d4fd01dc01a839f5c608ec8c45be76165c0

diff --git a/testtools/InternalUnoApi_bridgetest.mk b/testtools/InternalUnoApi_bridgetest.mk
index 643a8d9..fd627e7 100644
--- a/testtools/InternalUnoApi_bridgetest.mk
+++ b/testtools/InternalUnoApi_bridgetest.mk
@@ -39,4 +39,8 @@ $(eval $(call gb_InternalUnoApi_add_idlfiles,bridgetest,testtools/source/bridget
     bridgetest \
 ))
 
+$(eval $(call gb_InternalUnoApi_add_idlfiles,bridgetest,testtools/source/bridgetest/idl/com/sun/star/test/performance,\
+    XPerformanceTest \
+))
+
 # vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/testtools/source/bridgetest/idl/com/sun/star/test/performance/XPerformanceTest.idl b/testtools/source/bridgetest/idl/com/sun/star/test/performance/XPerformanceTest.idl
new file mode 100644
index 0000000..a5ea704
--- /dev/null
+++ b/testtools/source/bridgetest/idl/com/sun/star/test/performance/XPerformanceTest.idl
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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 .
+ */
+#ifndef __com_sun_star_test_performance_XPerformanceTest_idl__
+#define __com_sun_star_test_performance_XPerformanceTest_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+module com
+{
+module sun
+{
+module star
+{
+module test
+{
+module performance
+{
+
+/** struct of simple types to be carried
+*/
+published struct SimpleTypes
+{
+    boolean                    Bool;
+    char                       Char;
+    byte                       Byte;
+    short                      Short;
+    unsigned short             UShort;
+    long                       Long;
+    unsigned long              ULong;
+    hyper                      Hyper;
+    unsigned hyper             UHyper;
+    float                      Float;
+    double                     Double;
+};
+/** struct ComplexTypes adding Sequence, String, Interface, Any to SimpleTypes
+*/
+published struct ComplexTypes : SimpleTypes
+{
+    sequence< long >           Sequence;
+    string                     String;
+    com::sun::star::uno::XInterface Interface;
+    any                        Any;
+};
+
+/** A performance test object has to be implemented in a special way, that:
+    <ul>
+    <li>queryInterface() execution times remain (nearly) static</li>
+    <li>functions kept simple, thus there is (nearly) no execution time of the function itself</li>
+    <li>no dynamic data is ever returned except of createObject(), so return 0, empty strings etc.</li>
+    </ul>
+    The interface is divided into three sections:
+    <ul>
+    <li>measuring asynchron/ synchron calls</li>
+    <li>complex data calls with/out return value; in/out parameters</li>
+    <li>single data types like long, float, string etc.</li>
+    <li>method calls versa attribute calls</li>
+    <li>raising RuntimeException</li>
+    </ul>
+*/
+published interface XPerformanceTest : com::sun::star::uno::XInterface
+{
+    [oneway] void async();
+    void sync();
+
+    ComplexTypes complex_in( [in] ComplexTypes aVal );
+    ComplexTypes complex_inout( [inout] ComplexTypes aVal );
+
+    [oneway] void complex_oneway( [in] ComplexTypes aVal );
+    void complex_noreturn( [in] ComplexTypes aVal );
+
+    XPerformanceTest createObject();
+
+    [attribute] long                     Long_attr;
+    [attribute] hyper                    Hyper_attr;
+    [attribute] float                    Float_attr;
+    [attribute] double                   Double_attr;
+    [attribute] string                   String_attr;
+    [attribute] com::sun::star::uno::XInterface Interface_attr;
+    [attribute] any                      Any_attr;
+    [attribute] sequence< com::sun::star::uno::XInterface > Sequence_attr;
+    [attribute] ComplexTypes             Struct_attr;
+
+    long                getLong();
+    void                setLong( [in] long n );
+    hyper               getHyper();
+    void                setHyper( [in] hyper n );
+    float               getFloat();
+    void                setFloat( [in] float f );
+    double              getDouble();
+    void                setDouble( [in] double f );
+    string              getString();
+    void                setString( [in] string s );
+    com::sun::star::uno::XInterface getInterface();
+    void                setInterface( [in] com::sun::star::uno::XInterface x );
+    any                 getAny();
+    void                setAny( [in] any a );
+    sequence< com::sun::star::uno::XInterface > getSequence();
+    void                setSequence( [in] sequence< com::sun::star::uno::XInterface > seq );
+    ComplexTypes        getStruct();
+    void                setStruct( [in] ComplexTypes c );
+
+    void raiseRuntimeException();
+};
+
+
+};
+};
+};
+};
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 76324b35095a9fe2d65e224fba554d12e4af7a70
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Nov 28 16:26:19 2012 +0100

    ridljar etc.: javamaker invocations must rm -r targetdir
    
    ... because otherwise types that have been removed from the input rdb
    still end up in the resulting jar file.
    
    Change-Id: Ia73ecffcc9d831f2627ac0fcc5f57acf1f52a799

diff --git a/jurt/CustomTarget_test_urp.mk b/jurt/CustomTarget_test_urp.mk
index cf04e19..b83d914 100644
--- a/jurt/CustomTarget_test_urp.mk
+++ b/jurt/CustomTarget_test_urp.mk
@@ -34,6 +34,7 @@ $(call gb_CustomTarget_get_target,jurt/test/com/sun/star/lib/uno/protocols/urp)
 $(jurt_TESTURP)/done : $(jurt_TESTURP)/registry.rdb $(OUTDIR)/bin/types.rdb \
 		$(call gb_Executable_get_target_for_build,javamaker)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
+	rm -r $(jurt_TESTURP)/com && \
 	$(call gb_Helper_execute,javamaker -BUCR -O$(jurt_TESTURP) -nD $< -X$(OUTDIR)/bin/types.rdb) && \
 	touch $@
 
diff --git a/ridljar/CustomTarget_javamaker.mk b/ridljar/CustomTarget_javamaker.mk
index 3486d91..974de51 100644
--- a/ridljar/CustomTarget_javamaker.mk
+++ b/ridljar/CustomTarget_javamaker.mk
@@ -36,6 +36,7 @@ $(ridljar_DIR)/done : $(OUTDIR)/bin/udkapi.rdb \
 		| $(ridljar_DIR)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
 	$(call gb_Helper_abbreviate_dirs, \
+	rm -r $(ridljar_DIR) && \
 	$(call gb_Helper_execute,javamaker -BUCR -O$(ridljar_DIR) $<) && touch $@)
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/testtools/CustomTarget_bridgetest_javamaker.mk b/testtools/CustomTarget_bridgetest_javamaker.mk
index 00ea2b6..2dd0af4 100644
--- a/testtools/CustomTarget_bridgetest_javamaker.mk
+++ b/testtools/CustomTarget_bridgetest_javamaker.mk
@@ -37,6 +37,7 @@ $(testtools_JAVADIR)/done : \
 		| $(testtools_JAVADIR)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
 	$(call gb_Helper_abbreviate_dirs, \
+	rm -r $(testtools_JAVADIR) && \
 	$(call gb_Helper_execute,javamaker -BUCR -nD -O$(testtools_JAVADIR) -X$(OUTDIR)/bin/types.rdb $<) && touch $@)
 
 # vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/touch/CustomTarget_touch_javamaker.mk b/touch/CustomTarget_touch_javamaker.mk
index 7ccf6f1..ccb135a 100644
--- a/touch/CustomTarget_touch_javamaker.mk
+++ b/touch/CustomTarget_touch_javamaker.mk
@@ -16,6 +16,7 @@ $(touch_javamaker_DIR)/done : $(call gb_UnoApiTarget_get_target,touch) $(OUTDIR)
 		$(call gb_Executable_get_target_for_build,javamaker) | $(touch_javamaker_DIR)/.dir
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVM,1)
 	$(call gb_Helper_abbreviate_dirs, \
+	rm -r $(touch_javamaker_DIR) && \
 	$(call gb_Helper_execute,javamaker -BUCR -nD -O$(touch_javamaker_DIR)/class -X$(OUTDIR)/bin/types.rdb $<) && touch $@)
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list