Kaydet (Commit) 67cf29bb authored tarafından Matúš Kukan's avatar Matúš Kukan

sal: make more tests running

üst 68dad6ff
......@@ -37,6 +37,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
gendict \
genindex_data \
mkunroll \
osl_process_child \
rsc \
rscdep \
saxparser \
......
......@@ -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) \
))
......
# -*- 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:
......@@ -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,\
......
......@@ -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;
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment