diff options
author | Tomas Chvatal <tchvatal@suse.cz> | 2011-10-05 13:11:49 +0200 |
---|---|---|
committer | Tomas Chvatal <tchvatal@suse.cz> | 2011-10-05 13:12:15 +0200 |
commit | 0ca1973c7c97e62c727484ea66adef26fa2f8162 (patch) | |
tree | 482cff3edf5fa7c3dd880ed7209a211ab0683600 /sal | |
parent | e9cc0d9cabb6df2ec956be026970042cc3dbd70a (diff) |
Drop test that require tmp with exec rights.
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/module/osl_Module.cxx | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/sal/qa/osl/module/osl_Module.cxx b/sal/qa/osl/module/osl_Module.cxx index c8fed7d66881..0a0a37ed5a0f 100644 --- a/sal/qa/osl/module/osl_Module.cxx +++ b/sal/qa/osl/module/osl_Module.cxx @@ -291,54 +291,9 @@ namespace osl_Module CPPUNIT_ASSERT_MESSAGE( "#test comment#: load function should do the same thing as constructor with library name.", sal_True == bRes ); } - // load lib which is under a CJK directory - void load_002( ) - { -#if defined( UNX ) && !defined( MACOSX ) && !defined( FREEBSD ) - // TODO: Find out why this fails on Mac OS X - //Can not get a CJK directory already exist, so here create one. Perhaps reason is encoding problem. - ::rtl::OUString aPidDirURL = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///tmp/")) + ::rtl::OUString::valueOf( ( long )getpid( ) ); - ::rtl::OUString aMyDirURL = aPidDirURL + aKname; - createTestDirectory( aPidDirURL ); - createTestDirectory( aMyDirURL ); - - ::rtl::OUString aDLLURL = aMyDirURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/libModule_DLL.so")); - //check if the lib exist. - //FIXME: if assert condition is false, the case will return, so the directory will not be clean-up - CPPUNIT_ASSERT_MESSAGE( "#Source file is not exist. please manually clean-up directory and file under /tmp", ifFileExist( getDllURL( ) ) == sal_True ); - ::osl::FileBase::RC nError = ::osl::File::copy( getDllURL( ), aDLLURL ); - CPPUNIT_ASSERT_MESSAGE( "#copy failed. please manually clean-up directory and file under /tmp", nError == ::osl::FileBase::E_None ); - //ifFileExist returned false but the file exist - CPPUNIT_ASSERT_MESSAGE( "#This file is not exist, copy failed. please manually clean-up directory and file under /tmp", ifFileExist( aDLLURL ) == sal_True ); - - //test if can create a normal file - ::rtl::OUString aFileURL = aMyDirURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/test_file")); - ::osl::File testFile( aFileURL ); - nError = testFile.open( osl_File_OpenFlag_Create ); - CPPUNIT_ASSERT_MESSAGE( "#create failed. please manually clean-up directory and file under /tmp", nError == ::osl::FileBase::E_None ); - CPPUNIT_ASSERT_MESSAGE( "#This file is not exist, create failed. please manually clean-up directory and file under /tmp", ifFileExist( aFileURL ) == sal_True ); - - //load the copied dll - ::osl::Module aMod( aDLLURL ); - ::osl::Module aMod1; - - sal_Bool bOK = aMod1.load( aDLLURL ); - bRes = oslModule(aMod) == oslModule(aMod1); - aMod.unload( ); - aMod1.unload( ); - deleteTestFile( aFileURL ); - deleteTestFile( aDLLURL ); - deleteTestDirectory( aMyDirURL ); - deleteTestDirectory( aPidDirURL ); - - CPPUNIT_ASSERT_MESSAGE( "#test comment#: load lib which is under a CJK directory.", - sal_True == bRes && bOK == sal_True ); -#endif - } SAL_CPPUNIT_TEST_SUITE( load ); CPPUNIT_TEST( load_001 ); - CPPUNIT_TEST( load_002 ); SAL_CPPUNIT_TEST_SUITE_END( ); }; // class load |