sw/qa/core/uwriter.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit ed3ccdbde9ace7d2e3d67a9cc83a189cfaf1cad9
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Tue Aug 4 21:05:54 2020 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Aug 5 10:45:08 2020 +0200

    CppunitTest_sw_uwriter: make rng used in this test repeatable
    
    So in case the test fails, it's possible to see the same failure
    multiple times.
    
    Change-Id: Ic573807967b004bb7650ffb3614f5006db34080e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100137
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 079f7e311245..a2b5e99e079b 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -43,6 +43,7 @@
 #include <sfx2/docfile.hxx>
 
 #include <xmloff/odffields.hxx>
+#include <osl/process.h>
 
 #include <breakit.hxx>
 #include <doc.hxx>
@@ -1075,6 +1076,10 @@ getRandomPosition(SwDoc *pDoc, int /* nOffset */)
 
 void SwDocTest::randomTest()
 {
+    OUString aEnvKey("SAL_RAND_REPEATABLE");
+    OUString aEnvValue("1");
+    osl_setEnvironment(aEnvKey.pData, aEnvValue.pData);
+
     CPPUNIT_ASSERT_MESSAGE("SwDoc::IsRedlineOn()", 
!m_pDoc->getIDocumentRedlineAccess().IsRedlineOn());
     RedlineFlags modes[] = {
         RedlineFlags::On,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to