summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-08-28 08:00:20 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-08-28 08:01:02 +0100
commit87c33ab18f747fdfeb56079e723982e11fd97c5f (patch)
tree89781b28830e17b4a2e355d729e5d3121187d62b
parent3554d0a48a05206b894c3dec2f8c65e3b3c5119c (diff)
Disable the higher frequency timer tests more effectively.
Change-Id: Ibd832d85ce4b7e6747f95297d3c96d071aff41e2
-rw-r--r--vcl/qa/cppunit/timer.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/vcl/qa/cppunit/timer.cxx b/vcl/qa/cppunit/timer.cxx
index 1c08ff9c791b..c6daa16b432b 100644
--- a/vcl/qa/cppunit/timer.cxx
+++ b/vcl/qa/cppunit/timer.cxx
@@ -22,7 +22,8 @@
#include "salinst.hxx"
// #define TEST_WATCHDOG
-// Comment if UT fails randomly.
+
+// Enables timer tests that appear to provoke windows under load unduly.
//#define TEST_TIMERPRECISION
/// Avoid our timer tests just wedging the build if they fail.
@@ -61,8 +62,10 @@ public:
void testWatchdog();
#endif
void testDurations();
+#ifdef TEST_TIMERPRECISION
void testAutoTimer();
void testMultiAutoTimers();
+#endif
void testRecursiveTimer();
void testSlowTimerCallback();
@@ -73,8 +76,10 @@ public:
CPPUNIT_TEST(testWatchdog);
#endif
CPPUNIT_TEST(testDurations);
+#ifdef TEST_TIMERPRECISION
CPPUNIT_TEST(testAutoTimer);
CPPUNIT_TEST(testMultiAutoTimers);
+#endif
CPPUNIT_TEST(testRecursiveTimer);
CPPUNIT_TEST(testSlowTimerCallback);
@@ -195,6 +200,8 @@ public:
}
};
+#ifdef TEST_TIMERPRECISION
+
void TimerTest::testAutoTimer()
{
const sal_Int32 nDurationMs = 30;
@@ -231,9 +238,7 @@ void TimerTest::testAutoTimer()
}
}
-#ifdef TEST_TIMERPRECISION
CPPUNIT_FAIL(msg.str().c_str());
-#endif
}
void TimerTest::testMultiAutoTimers()
@@ -295,10 +300,9 @@ void TimerTest::testMultiAutoTimers()
}
}
-#ifdef TEST_TIMERPRECISION
CPPUNIT_FAIL(msg.str().c_str());
-#endif
}
+#endif // TEST_TIMERPRECISION
// --------------------------------------------------------------------