[SCM] LibreOffice packaging repository branch, debian-experimental-4.1, updated. libreoffice_4.0.3-2-152-g08b6cbd
The following commit has been merged in the debian-experimental-4.1 branch:
commit dc402426f543e7ae93e935df75f8517285b17cb4
Author: Rene Engelhard <rene@debian.org>
Date: Thu May 23 10:18:30 2013 +0200
backport test fix (disable calc perf test) from libreoffice-4-1 branch
diff --git a/changelog b/changelog
index 9871199..4dad690 100644
--- a/changelog
+++ b/changelog
@@ -15,7 +15,7 @@ libreoffice (1:4.1.0~beta1-1) UNRELEASED; urgency=low
- temporarily disable cleandupes for -l10n-* as it's broken right nwo
* debian/uno-libs3.symbols: update
- -- Rene Engelhard <rene@debian.org> Wed, 22 May 2013 21:40:45 +0200
+ -- Rene Engelhard <rene@debian.org> Thu, 23 May 2013 10:15:45 +0200
libreoffice (1:4.0.3-3) unstable; urgency=low
diff --git a/patches/disable-calc-perf-test.diff b/patches/disable-calc-perf-test.diff
new file mode 100644
index 0000000..d402717
--- /dev/null
+++ b/patches/disable-calc-perf-test.diff
@@ -0,0 +1,249 @@
+From 5cfb604159f0b73c94f528b5005da8734f2b2c2e Mon Sep 17 00:00:00 2001
+From: Kohei Yoshida <kohei.yoshida@gmail.com>
+Date: Wed, 22 May 2013 16:14:24 +0000
+Subject: Disable Calc perf test by default & output both pseudo-cycles and real time.
+
+Change-Id: I35120e576208640976cdda0a5628e355bbe2dc7c
+(cherry picked from commit 4fa7a0ce8131106a038ba441bcc230d0377690ac)
+---
+diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
+index 90da5f0..3f306d0 100644
+--- a/sc/qa/unit/ucalc.cxx
++++ b/sc/qa/unit/ucalc.cxx
+@@ -77,6 +77,7 @@
+ #include <vector>
+
+ #define CALC_DEBUG_OUTPUT 0
++#define CALC_TEST_PERF 0
+
+ #include "helper/debughelper.hxx"
+ #include "helper/qahelper.hxx"
+@@ -92,16 +93,6 @@ using ::std::vector;
+
+ namespace {
+
+-double getTimeDiff(const TimeValue& t1, const TimeValue& t2)
+-{
+- double tv1 = t1.Seconds;
+- double tv2 = t2.Seconds;
+- tv1 += t1.Nanosec / 1000000000.0;
+- tv2 += t2.Nanosec / 1000000000.0;
+-
+- return tv1 - tv2;
+-}
+-
+ class Test : public test::BootstrapFixture {
+ public:
+ Test();
+@@ -283,7 +274,7 @@ public:
+ void testCondFormatINSDEL();
+
+ CPPUNIT_TEST_SUITE(Test);
+-#if !defined(DBG_UTIL) && !defined(_WIN32_WINNT)
++#if CALC_TEST_PERF
+ CPPUNIT_TEST(testPerf);
+ #endif
+ CPPUNIT_TEST(testCollator);
+@@ -447,20 +438,11 @@ public:
+ class MeasureTimeSwitch
+ {
+ double& mrDiff;
+- double mnScale;
+ TimeValue maTimeBefore;
+ public:
+ MeasureTimeSwitch(double& rDiff) : mrDiff(rDiff)
+ {
+ mrDiff = 9999.0;
+- mnScale = 1.0;
+- osl_getSystemTime(&maTimeBefore);
+- }
+- // Scaled pseudo-time
+- MeasureTimeSwitch(double& rDiff, const double nScale ) : mrDiff(rDiff)
+- {
+- mrDiff = 9999.0;
+- mnScale = nScale;
+ osl_getSystemTime(&maTimeBefore);
+ }
+
+@@ -468,7 +450,17 @@ public:
+ {
+ TimeValue aTimeAfter;
+ osl_getSystemTime(&aTimeAfter);
+- mrDiff = getTimeDiff(aTimeAfter, maTimeBefore) / mnScale;
++ mrDiff = getTimeDiff(aTimeAfter, maTimeBefore);
++ }
++
++ double getTimeDiff(const TimeValue& t1, const TimeValue& t2) const
++ {
++ double tv1 = t1.Seconds;
++ double tv2 = t2.Seconds;
++ tv1 += t1.Nanosec / 1000000000.0;
++ tv2 += t2.Nanosec / 1000000000.0;
++
++ return tv1 - tv2;
+ }
+ };
+
+@@ -497,13 +489,13 @@ void Test::tearDown()
+ BootstrapFixture::tearDown();
+ }
+
+-#define PERF_ASSERT(df,time,message) \
++#define PERF_ASSERT(df,scale,time,message) \
+ do { \
+- if ((df) >= (time)) \
++ double dfscaled = df / scale; \
++ if ((dfscaled) >= (time)) \
+ { \
+ std::ostringstream os; \
+- os << message << " took " << diff << " psuedo-cycles, expected: " << time; \
+- /* debugging - fprintf (stderr, "'%s'\n", os.str().c_str()); */ \
++ os << message << " took " << dfscaled << " pseudo-cycles (" << df << " real-time seconds), expected: " << time << " pseudo-cycles."; \
+ CPPUNIT_FAIL(os.str().c_str()); \
+ } \
+ } while (0)
+@@ -545,10 +537,10 @@ void Test::testPerf()
+ // second. Flag failure if it takes more than one second. Clearing 100
+ // columns should be large enough to flag if something goes wrong.
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ clearRange(m_pDoc, ScRange(0,0,0,99,MAXROW,0));
+ }
+- PERF_ASSERT(diff, 1.0, "Clearing an empty sheet");
++ PERF_ASSERT(diff, scale, 1.0, "Clearing an empty sheet");
+
+ {
+ // Switch to R1C1 to make it easier to input relative references in multiple cells.
+@@ -563,10 +555,10 @@ void Test::testPerf()
+ // Now, Delete B2:B100000. This should complete in a fraction of a second
+ // (0.06 sec on my machine).
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ clearRange(m_pDoc, ScRange(1,1,0,1,99999,0));
+ }
+- PERF_ASSERT(diff, 3000, "Removal of a large array of formula cells");
++ PERF_ASSERT(diff, scale, 2000, "Removal of a large array of formula cells");
+ }
+
+ clearRange(m_pDoc, ScRange(0,0,0,1,MAXROW,0)); // Clear columns A:B.
+@@ -597,10 +589,10 @@ void Test::testPerf()
+ aMark.SetMarkArea(aPasteRange);
+
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ m_pDoc->CopyFromClip(aPasteRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ }
+- PERF_ASSERT(diff, 1500.0, "Pasting a single cell to A2:A100000");
++ PERF_ASSERT(diff, scale, 1500.0, "Pasting a single cell to A2:A100000");
+
+ ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
+ pRedoDoc->InitUndo(m_pDoc, 0, 0);
+@@ -615,10 +607,10 @@ void Test::testPerf()
+ CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), m_pDoc->GetString(aPasteRange.aEnd));
+
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ aUndo.Undo();
+ }
+- PERF_ASSERT(diff, 500.0, "Undoing a pasting of a cell to A2:A100000");
++ PERF_ASSERT(diff, scale, 500.0, "Undoing a pasting of a cell to A2:A100000");
+
+ // Make sure it's really undone.
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_STRING, m_pDoc->GetCellType(aPos));
+@@ -627,10 +619,10 @@ void Test::testPerf()
+
+ // Now redo.
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ aUndo.Redo();
+ }
+- PERF_ASSERT(diff, 1000.0, "Redoing a pasting of a cell to A2:A100000");
++ PERF_ASSERT(diff, scale, 1000.0, "Redoing a pasting of a cell to A2:A100000");
+
+ // Make sure it's really redone.
+ CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), m_pDoc->GetString(aPasteRange.aStart));
+@@ -668,10 +660,10 @@ void Test::testPerf()
+ aMark.SetMarkArea(aPasteRange);
+
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ m_pDoc->CopyFromClip(aPasteRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ }
+- PERF_ASSERT(diff, 1000.0, "Pasting A1:A2 to A3:A100001");
++ PERF_ASSERT(diff, scale, 1000.0, "Pasting A1:A2 to A3:A100001");
+
+ ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
+ pRedoDoc->InitUndo(m_pDoc, 0, 0);
+@@ -689,10 +681,10 @@ void Test::testPerf()
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_NONE, m_pDoc->GetCellType(aTmp));
+
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ aUndo.Undo();
+ }
+- PERF_ASSERT(diff, 500.0, "Undoing");
++ PERF_ASSERT(diff, scale, 500.0, "Undoing");
+
+ // Make sure it's really undone.
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_VALUE, m_pDoc->GetCellType(aPos));
+@@ -701,10 +693,10 @@ void Test::testPerf()
+
+ // Now redo.
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ aUndo.Redo();
+ }
+- PERF_ASSERT(diff, 800.0, "Redoing");
++ PERF_ASSERT(diff, scale, 800.0, "Redoing");
+
+ // Make sure it's really redone.
+ CPPUNIT_ASSERT_EQUAL(m_pDoc->GetString(aPos), m_pDoc->GetString(aPasteRange.aStart));
+@@ -745,10 +737,10 @@ void Test::testPerf()
+ aMark.SetMarkArea(aPasteRange);
+
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ m_pDoc->CopyFromClip(aPasteRange, aMark, IDF_CONTENTS, pUndoDoc, &aClipDoc);
+ }
+- PERF_ASSERT(diff, 2000.0, "Pasting");
++ PERF_ASSERT(diff, scale, 2000.0, "Pasting");
+
+ ScDocument* pRedoDoc = new ScDocument(SCDOCMODE_UNDO);
+ pRedoDoc->InitUndo(m_pDoc, 0, 0);
+@@ -767,10 +759,10 @@ void Test::testPerf()
+
+ #if 0 // TODO: Undo and redo of this scenario is currently not fast enough to be tested reliably.
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ aUndo.Undo();
+ }
+- PERF_ASSERT(diff, 1.0, "Undoing");
++ PERF_ASSERT(diff, scale, 1.0, "Undoing");
+
+ // Make sure it's really undone.
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_FORMULA, m_pDoc->GetCellType(aPos));
+@@ -779,10 +771,10 @@ void Test::testPerf()
+
+ // Now redo.
+ {
+- MeasureTimeSwitch aTime(diff, scale);
++ MeasureTimeSwitch aTime(diff);
+ aUndo.Redo();
+ }
+- PERF_ASSERT(diff, 1.0, "Redoing");
++ PERF_ASSERT(diff, scale, 1.0, "Redoing");
+
+ // Make sure it's really redone.
+ CPPUNIT_ASSERT_EQUAL(CELLTYPE_FORMULA, m_pDoc->GetCellType(aPasteRange.aStart));
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/patches/series b/patches/series
index 65b37cd..329c958 100644
--- a/patches/series
+++ b/patches/series
@@ -28,3 +28,4 @@ wheezy-backports-python.diff
fix-internal-hsqldb-build.diff
disable-sw_python.diff
#uno-executables-link-to-xmlreader.diff
+disable-calc-perf-test.diff
--
LibreOffice packaging repository
Reply to: