comphelper/CppunitTest_comphelper_test.mk |    7 +++++++
 comphelper/qa/unit/test_hash.cxx          |   12 ++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 02323e893a2bd426ee8a07d25ac7d4a1e66d3be1
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 4 16:44:55 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon May 4 20:13:12 2020 +0200

    fix leak in comphelper::TestHash
    
    by shutting down NSS at end of test
    
    Change-Id: I63694e9bc54e8c142592005be353af7ed95d444d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93427
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/CppunitTest_comphelper_test.mk 
b/comphelper/CppunitTest_comphelper_test.mk
index 8bb335aa24dc..ef795f1664d1 100644
--- a/comphelper/CppunitTest_comphelper_test.mk
+++ b/comphelper/CppunitTest_comphelper_test.mk
@@ -27,4 +27,11 @@ $(eval $(call gb_CppunitTest_use_libraries,comphelper_test, \
     sal \
 ))
 
+ifeq ($(TLS),NSS)
+$(eval $(call gb_CppunitTest_use_externals,comphelper_test,\
+       plc4 \
+       nss3 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/comphelper/qa/unit/test_hash.cxx b/comphelper/qa/unit/test_hash.cxx
index 650cd6fc6976..99ce5bfd1751 100644
--- a/comphelper/qa/unit/test_hash.cxx
+++ b/comphelper/qa/unit/test_hash.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <sal/config.h>
+#include <config_oox.h>
 #include <comphelper/hash.hxx>
 #include <comphelper/docpasswordhelper.hxx>
 
@@ -16,6 +18,10 @@
 #include <cppunit/TestFixture.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+#if USE_TLS_NSS
+#include <nss.h>
+#endif
+
 class TestHash : public CppUnit::TestFixture
 {
 public:
@@ -26,6 +32,12 @@ public:
     void testSHA512_NoSaltNoSpin();
     void testSHA512_saltspin();
 
+    virtual void tearDown()
+    {
+#if USE_TLS_NSS
+        NSS_Shutdown();
+#endif
+    }
     CPPUNIT_TEST_SUITE(TestHash);
     CPPUNIT_TEST(testMD5);
     CPPUNIT_TEST(testSHA1);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to