[Libreoffice-commits] .: 2 commits - Repository.mk sal/CppunitTest_Module_DLL.mk sal/CppunitTest_sal_osl_file.mk sal/CppunitTest_sal_osl_module.mk sal/CppunitTest_sal_osl_old_test_file.mk sal/CppunitTest_sal_osl_process.mk sal/CppunitTest_sal_osl_thread.mk sal/Executable_osl_process_child.mk sal/Module_sal.mk sal/qa

Matus Kukan mkukan at kemper.freedesktop.org
Sat Jan 21 10:36:54 PST 2012


 Repository.mk                            |    1 
 sal/CppunitTest_Module_DLL.mk            |   42 ++++++++++++++++++++++
 sal/CppunitTest_sal_osl_file.mk          |    1 
 sal/CppunitTest_sal_osl_module.mk        |   13 -------
 sal/CppunitTest_sal_osl_old_test_file.mk |    1 
 sal/CppunitTest_sal_osl_process.mk       |   13 -------
 sal/CppunitTest_sal_osl_thread.mk        |   39 +++++++++++++++++++++
 sal/Executable_osl_process_child.mk      |   57 +++++++++++++++++++++++++++++++
 sal/Module_sal.mk                        |   17 ++++++---
 sal/qa/osl/module/osl_Module.cxx         |    4 +-
 sal/qa/osl/process/osl_process.cxx       |    5 +-
 11 files changed, 155 insertions(+), 38 deletions(-)

New commits:
commit 67cf29bb36587f03ec19c789657da4236553c5fd
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sat Jan 21 18:51:16 2012 +0100

    sal: make more tests running

diff --git a/Repository.mk b/Repository.mk
index c9a8dfb..2f54f98 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
     gendict \
     genindex_data \
     mkunroll \
+    osl_process_child \
     rsc \
     rscdep \
     saxparser \
diff --git a/sal/CppunitTest_Module_DLL.mk b/sal/CppunitTest_Module_DLL.mk
new file mode 100644
index 0000000..048bd2b
--- /dev/null
+++ b/sal/CppunitTest_Module_DLL.mk
@@ -0,0 +1,42 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+# This is not really a test. Only a dynamic library which is loaded by
+# sal_osl_module unit test library.
+
+$(eval $(call gb_CppunitTest_CppunitTest,Module_DLL))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,Module_DLL,\
+    sal/qa/osl/module/osl_Module_DLL \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,Module_DLL,\
+    sal \
+    $(gb_STDLIBS) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sal/CppunitTest_sal_osl_module_dll.mk b/sal/CppunitTest_sal_osl_module_dll.mk
deleted file mode 100644
index ca3d559..0000000
--- a/sal/CppunitTest_sal_osl_module_dll.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-#
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_CppunitTest_CppunitTest,sal_osl_module_dll))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_module_dll,\
-    sal/qa/osl/module/osl_Module_DLL \
-))
-
-$(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_module_dll,\
-    sal \
-    $(gb_STDLIBS) \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sal/Executable_osl_process_child.mk b/sal/Executable_osl_process_child.mk
new file mode 100644
index 0000000..c6fa16e
--- /dev/null
+++ b/sal/Executable_osl_process_child.mk
@@ -0,0 +1,57 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2012 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+# This executable is only required by unit-test sal_osl_profile.
+# See qa/osl/process/osl_process.cxx:411
+$(eval $(call gb_Executable_Executable,osl_process_child))
+
+$(eval $(call gb_Executable_add_linked_libs,osl_process_child,\
+	sal \
+	$(gb_STDLIBS) \
+))
+
+$(eval $(call gb_Executable_add_exception_objects,osl_process_child,\
+	sal/qa/osl/process/osl_process_child \
+))
+
+# Also this batch file is required by sal_osl_profile.
+# See qa/osl/process/osl_process.cxx:675
+ifeq ($(OS),WNT)
+BATCH_FILE:=batch.bat
+else
+BATCH_FILE:=batch.sh
+endif
+
+$(call gb_Executable_get_target,osl_process_child): $(WORKDIR)/LinkTarget/Executable/$(BATCH_FILE)
+
+$(WORKDIR)/LinkTarget/Executable/$(BATCH_FILE): $(SRCDIR)/sal/qa/osl/process/$(BATCH_FILE)
+	$(call gb_Deliver_deliver,$<,$@)
+
+$(call gb_Executable_get_clean_target,osl_process_child): 
+	rm -f $(WORKDIR)/LinkTarget/Executable/$(BATCH_FILE)
+
+# vim: set noet sw=4 ts=4:
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index 2d9a09f..1260afd 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -29,6 +29,7 @@
 $(eval $(call gb_Module_Module,sal))
 
 $(eval $(call gb_Module_add_targets,sal,\
+	Executable_osl_process_child \
 	$(if $(filter $(OS),IOS),,\
 		Executable_cppunittester) \
 	$(if $(filter $(OS),ANDROID), \
@@ -43,31 +44,34 @@ $(eval $(call gb_Module_add_targets,sal,\
 ))
 
 $(eval $(call gb_Module_add_check_targets,sal,\
+	CppunitTest_Module_DLL \
 	CppunitTest_sal_bytesequence \
 	CppunitTest_sal_osl_condition \
 	CppunitTest_sal_osl_file \
-	CppunitTest_sal_osl_module_dll \
-	CppunitTest_sal_osl_mutex \
+	CppunitTest_sal_osl_module \
 	CppunitTest_sal_osl_old_test_file \
-	CppunitTest_sal_osl_profile \
 	CppunitTest_sal_osl_security \
-	CppunitTest_sal_osl_setthreadname \
 	CppunitTest_sal_osl_thread \
+	CppunitTest_sal_osl_process \
 	CppunitTest_sal_rtl_alloc \
 	CppunitTest_sal_rtl_cipher \
 	CppunitTest_sal_rtl_crc32 \
 	CppunitTest_sal_rtl_doublelock \
 	CppunitTest_sal_rtl_locale \
-	CppunitTest_sal_rtl_math \
 	CppunitTest_sal_rtl_ostringbuffer \
 	CppunitTest_sal_rtl_oustringbuffer \
 	CppunitTest_sal_rtl_strings \
 	CppunitTest_sal_tcwf \
 	CppunitTest_sal_types \
 ))
-# these are failing: \
-	CppunitTest_sal_osl_module \
-	CppunitTest_sal_osl_process \
+
+# these were added when gbuild'izing
+$(eval $(call gb_Module_add_check_targets,sal,\
+	CppunitTest_sal_osl_mutex \
+	CppunitTest_sal_osl_profile \
+	CppunitTest_sal_osl_setthreadname \
+	CppunitTest_sal_rtl_math \
+))
 
 # CppunitTest_sal_osl_pipe has circular dependency on unotest
 # $(eval $(call gb_Module_add_subsequentcheck_targets,sal,\
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx
index 09dc1d0..c460acb 100644
--- a/sal/qa/osl/module/osl_Module.cxx
+++ b/sal/qa/osl/module/osl_Module.cxx
@@ -66,9 +66,9 @@ inline void printUString( const ::rtl::OUString & str )
 inline ::rtl::OUString getDllURL( void )
 {
 #if ( defined WNT )        // lib in Unix and lib in Windows are not same in file name.
-    ::rtl::OUString libPath( RTL_CONSTASCII_USTRINGPARAM("Module_DLL.dll") );
+    ::rtl::OUString libPath( RTL_CONSTASCII_USTRINGPARAM("test_Module_DLL.dll") );
 #else
-    ::rtl::OUString libPath( RTL_CONSTASCII_USTRINGPARAM("libModule_DLL.so") );
+    ::rtl::OUString libPath( RTL_CONSTASCII_USTRINGPARAM("libtest_Module_DLL.so") );
 #endif
 
     ::rtl::OUString dirPath, dllPath;
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index c8a79a8..367d6d9 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -106,7 +106,7 @@ inline ::rtl::OUString getExecutablePath( void )
     osl::Module::getUrlFromAddress( ( void* ) &getExecutablePath, dirPath );
     dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') );
     dirPath = dirPath.copy( 0, dirPath.lastIndexOf('/') + 1);
-    dirPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bin"));
+    dirPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Executable"));
     return dirPath;
 }
 
@@ -744,8 +744,7 @@ public:
     CPPUNIT_TEST(osl_execProc_parent_equals_child_environment);
     CPPUNIT_TEST(osl_execProc_merged_child_environment);
 #endif
-    ///TODO: Repair makefile to get the batch.sh, batch.bat copied to $(BIN) for test execution
-    // CPPUNIT_TEST(osl_execProc_test_batch);
+    CPPUNIT_TEST(osl_execProc_test_batch);
     ///TODO: Repair test (or tested function ;-) - test fails.
     // CPPUNIT_TEST(osl_execProc_exe_name_in_argument_list);
     SAL_CPPUNIT_TEST_SUITE_END();
commit 68dad6ff9d5547d94ff1b1085dfec9c8fef9c726
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Sat Jan 21 16:31:41 2012 +0100

    sal: split unit-tests to one test per makefile

diff --git a/sal/CppunitTest_sal_osl_file.mk b/sal/CppunitTest_sal_osl_file.mk
index d118f25..f3a72e2 100644
--- a/sal/CppunitTest_sal_osl_file.mk
+++ b/sal/CppunitTest_sal_osl_file.mk
@@ -25,7 +25,6 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-# sal_osl_file
 $(eval $(call gb_CppunitTest_CppunitTest,sal_osl_file))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_file,\
diff --git a/sal/CppunitTest_sal_osl_module.mk b/sal/CppunitTest_sal_osl_module.mk
index 288a442..e1347a3 100644
--- a/sal/CppunitTest_sal_osl_module.mk
+++ b/sal/CppunitTest_sal_osl_module.mk
@@ -25,7 +25,6 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-# sal_osl_module
 $(eval $(call gb_CppunitTest_CppunitTest,sal_osl_module))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_module,\
@@ -37,16 +36,4 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_module,\
     $(gb_STDLIBS) \
 ))
 
-# sal_osl_module_dll
-$(eval $(call gb_CppunitTest_CppunitTest,sal_osl_module_dll))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_module_dll,\
-    sal/qa/osl/module/osl_Module_DLL \
-))
-
-$(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_module_dll,\
-    sal \
-    $(gb_STDLIBS) \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/sal/CppunitTest_sal_osl_module_dll.mk b/sal/CppunitTest_sal_osl_module_dll.mk
new file mode 100644
index 0000000..ca3d559
--- /dev/null
+++ b/sal/CppunitTest_sal_osl_module_dll.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_CppunitTest_CppunitTest,sal_osl_module_dll))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_module_dll,\
+    sal/qa/osl/module/osl_Module_DLL \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_module_dll,\
+    sal \
+    $(gb_STDLIBS) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sal/CppunitTest_sal_osl_old_test_file.mk b/sal/CppunitTest_sal_osl_old_test_file.mk
index 30a561e..4424f25 100644
--- a/sal/CppunitTest_sal_osl_old_test_file.mk
+++ b/sal/CppunitTest_sal_osl_old_test_file.mk
@@ -25,7 +25,6 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-# sal_osl_old_test_file
 $(eval $(call gb_CppunitTest_CppunitTest,sal_osl_old_test_file))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_old_test_file,\
diff --git a/sal/CppunitTest_sal_osl_process.mk b/sal/CppunitTest_sal_osl_process.mk
index c7b13ab..257d065 100644
--- a/sal/CppunitTest_sal_osl_process.mk
+++ b/sal/CppunitTest_sal_osl_process.mk
@@ -25,7 +25,6 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-# osl_process
 $(eval $(call gb_CppunitTest_CppunitTest,sal_osl_process))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_process,\
@@ -37,16 +36,4 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_process,\
     $(gb_STDLIBS) \
 ))
 
-# osl_Thread
-$(eval $(call gb_CppunitTest_CppunitTest,sal_osl_thread))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_thread,\
-    sal/qa/osl/process/osl_Thread \
-))
-
-$(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_thread,\
-    sal \
-    $(gb_STDLIBS) \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/sal/CppunitTest_sal_osl_thread.mk b/sal/CppunitTest_sal_osl_thread.mk
new file mode 100644
index 0000000..7f27013
--- /dev/null
+++ b/sal/CppunitTest_sal_osl_thread.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License or as specified alternatively below. You may obtain a copy of
+# the License at http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# Major Contributor(s):
+# Copyright (C) 2011 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
+#
+# All Rights Reserved.
+#
+# For minor contributions see the git repository.
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+
+$(eval $(call gb_CppunitTest_CppunitTest,sal_osl_thread))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_thread,\
+    sal/qa/osl/process/osl_Thread \
+))
+
+$(eval $(call gb_CppunitTest_add_linked_libs,sal_osl_thread,\
+    sal \
+    $(gb_STDLIBS) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index 6d7d2c6..2d9a09f 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -46,13 +46,13 @@ $(eval $(call gb_Module_add_check_targets,sal,\
 	CppunitTest_sal_bytesequence \
 	CppunitTest_sal_osl_condition \
 	CppunitTest_sal_osl_file \
-	CppunitTest_sal_osl_module \
+	CppunitTest_sal_osl_module_dll \
 	CppunitTest_sal_osl_mutex \
 	CppunitTest_sal_osl_old_test_file \
-	CppunitTest_sal_osl_process \
 	CppunitTest_sal_osl_profile \
 	CppunitTest_sal_osl_security \
 	CppunitTest_sal_osl_setthreadname \
+	CppunitTest_sal_osl_thread \
 	CppunitTest_sal_rtl_alloc \
 	CppunitTest_sal_rtl_cipher \
 	CppunitTest_sal_rtl_crc32 \
@@ -65,6 +65,9 @@ $(eval $(call gb_Module_add_check_targets,sal,\
 	CppunitTest_sal_tcwf \
 	CppunitTest_sal_types \
 ))
+# these are failing: \
+	CppunitTest_sal_osl_module \
+	CppunitTest_sal_osl_process \
 
 # CppunitTest_sal_osl_pipe has circular dependency on unotest
 # $(eval $(call gb_Module_add_subsequentcheck_targets,sal,\


More information about the Libreoffice-commits mailing list