[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] LibreOffice packaging repository branch, debian-experimental-3.5, updated. libreoffice_3.4.4-1-164-gb553562



The following commit has been merged in the debian-experimental-3.5 branch:
commit b553562a8cfc0213b7970bec921dc9fb25b5fc4f
Author: Rene Engelhard <rene@debian.org>
Date:   Tue Dec 20 19:22:31 2011 +0100

    add upstream workaround for the unordf_complex check

diff --git a/patches/disable-broken-checks.diff b/patches/disable-broken-checks.diff
deleted file mode 100644
index 8475633..0000000
--- a/patches/disable-broken-checks.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- libreoffice-3.5.0/unoxml/Module_unoxml.mk-old	2011-12-20 17:15:05.000000000 +0100
-+++ libreoffice-3.5.0/unoxml/Module_unoxml.mk	2011-12-20 17:15:34.000000000 +0100
-@@ -35,7 +35,6 @@
- 
- $(eval $(call gb_Module_add_subsequentcheck_targets,unoxml,\
-     JunitTest_unoxml_complex \
--    JunitTest_unordf_complex \
- ))
- 
- # vim: set noet sw=4 ts=4:
diff --git a/patches/fix-unordf_complex-check.diff b/patches/fix-unordf_complex-check.diff
new file mode 100644
index 0000000..298c274
--- /dev/null
+++ b/patches/fix-unordf_complex-check.diff
@@ -0,0 +1,86 @@
+From 63e2762c4e5ce55aa0ce88f7eff72f90bf4c465a Mon Sep 17 00:00:00 2001
+From: Michael Stahl <mstahl@redhat.com>
+Date: Tue, 20 Dec 2011 17:28:58 +0000
+Subject: unordf: tweak SPARQL unit test:
+
+rasqal 0.9.27 returns no variables for a SPARQL SELECT query with no
+results; it is unclear whether that is allowed but it is a corner case
+and probably we should not be testing for that.
+(cherry picked from commit cb1ad8c8df48161917fdb2044ac55d144049d2f4)
+---
+diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
+index 7944a0e..d1006c2 100644
+--- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
++++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
+@@ -785,15 +785,30 @@ public class RDFRepositoryTest
+         String[] vars = (String[]) i_Result.getBindingNames();
+         XEnumeration iter = (XEnumeration) i_Result;
+         XNode[][] bindings = toSeqs(iter);
+-        if (vars.length != i_Vars.length) {
+-            System.out.println("var lengths differ");
+-            return false;
+-        }
+         if (bindings.length != i_Bindings.length) {
+             System.out.println("binding lengths differ: " + i_Bindings.length +
+                 " vs " + bindings.length );
+             return false;
+         }
++        if (vars.length != i_Vars.length) {
++            // ignore for empty result: it is unclear to me whether SPARQL
++            // spec requires returning the variables in this case,
++            // and evidently newer rasqal versions don't
++            if (0 != i_Bindings.length || 0 != vars.length)
++            {
++                System.out.println("var lengths differ: expected "
++                        + i_Vars.length + " but got " + vars.length);
++                return false;
++            }
++        } else {
++            for (int i = 0; i < i_Vars.length; ++i) {
++                if (!vars[i].equals(i_Vars[i])) {
++                    System.out.println("variable names differ: " +
++                        vars[i] + " != " + i_Vars[i]);
++                    return false;
++                }
++            }
++        }
+         java.util.Arrays.sort(bindings, new BindingComp());
+         java.util.Arrays.sort(i_Bindings, new BindingComp());
+         for (int i = 0; i < i_Bindings.length; ++i) {
+@@ -813,13 +828,6 @@ public class RDFRepositoryTest
+                 }
+             }
+         }
+-        for (int i = 0; i < i_Vars.length; ++i) {
+-            if (!vars[i].equals(i_Vars[i])) {
+-                System.out.println("variable names differ: " +
+-                    vars[i] + " != " + i_Vars[i]);
+-                return false;
+-            }
+-        }
+         return true;
+     }
+ 
+@@ -839,6 +847,20 @@ public class RDFRepositoryTest
+         return namespaces;
+     }
+ 
++    // useful when debugging
++    static void dumpRepo(XDocumentRepository xRep) throws Exception
++    {
++        XEnumeration xEnum = xRep.getStatements(null, null, null);
++        while (xEnum.hasMoreElements())
++        {
++            Statement s = (Statement) xEnum.nextElement();
++            System.out.println("STATEMENT IN: " + toS(s.Graph)
++                    + "\n S: " + toS(s.Subject)
++                    + "\n P: " + toS(s.Predicate)
++                    + "\n O: " + toS(s.Object));
++        }
++    }
++
+     class TestRange implements XTextRange, XMetadatable, XServiceInfo
+     {
+         String m_Stream;
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/patches/series b/patches/series
index 04e0067..66e45c4 100644
--- a/patches/series
+++ b/patches/series
@@ -21,5 +21,5 @@ fix-racecondition-in-sdext-source-pdfimport-makefile.diff
 fix-armhf-build-in-bridges.diff
 disable-user-template-nonsense.diff
 fix-mailmerge-install.diff
-disable-broken-checks.diff
+fix-unordf_complex-check.diff
 visioimport-is-a-graphicfilter.diff

-- 
LibreOffice packaging repository


Reply to: