diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-01-21 18:51:16 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-01-21 19:33:13 +0100 |
commit | 67cf29bb36587f03ec19c789657da4236553c5fd (patch) | |
tree | cec5aa765c85e599092ff1954b3e2aed19ea9a65 /sal | |
parent | 68dad6ff9d5547d94ff1b1085dfec9c8fef9c726 (diff) |
sal: make more tests running
Diffstat (limited to 'sal')
-rw-r--r-- | sal/CppunitTest_Module_DLL.mk (renamed from sal/CppunitTest_sal_osl_module_dll.mk) | 9 | ||||
-rw-r--r-- | sal/Executable_osl_process_child.mk | 57 | ||||
-rw-r--r-- | sal/Module_sal.mk | 20 | ||||
-rw-r--r-- | sal/qa/osl/module/osl_Module.cxx | 4 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_process.cxx | 5 |
5 files changed, 79 insertions, 16 deletions
diff --git a/sal/CppunitTest_sal_osl_module_dll.mk b/sal/CppunitTest_Module_DLL.mk index ca3d5592f268..048bd2b1027e 100644 --- a/sal/CppunitTest_sal_osl_module_dll.mk +++ b/sal/CppunitTest_Module_DLL.mk @@ -25,13 +25,16 @@ # 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)) +# This is not really a test. Only a dynamic library which is loaded by +# sal_osl_module unit test library. -$(eval $(call gb_CppunitTest_add_exception_objects,sal_osl_module_dll,\ +$(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,sal_osl_module_dll,\ +$(eval $(call gb_CppunitTest_add_linked_libs,Module_DLL,\ sal \ $(gb_STDLIBS) \ )) diff --git a/sal/Executable_osl_process_child.mk b/sal/Executable_osl_process_child.mk new file mode 100644 index 000000000000..c6fa16e43aca --- /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@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 2d9a09fc65c6..1260afd7f5d5 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 09dc1d0bdea8..c460acbbdc14 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 c8a79a81462f..367d6d94aa23 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(); |