[Libreoffice-commits] .: Branch 'feature/android' - 5 commits - android/qa sal/android sal/inc sal/osl sc/qa
Tor Lillqvist
tml at kemper.freedesktop.org
Tue Jan 31 07:31:35 PST 2012
android/qa/sc/Makefile | 4 ++++
sal/android/lo-bootstrap.c | 23 ++++++++++++++++++++++-
sal/inc/osl/detail/android-bootstrap.h | 2 ++
sal/osl/unx/module.c | 4 ++++
sc/qa/unit/filters-test.cxx | 8 ++++++--
5 files changed, 38 insertions(+), 3 deletions(-)
New commits:
commit a322022d9a73c31eb26f0752b528e9e866ce6140
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 17:28:52 2012 +0200
Move assertions before use
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 2a0b3e2..8314c8c 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -291,9 +291,11 @@ void ScFiltersTest::testRangeName()
rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8);
std::cout << aFileFormats[i].pName << " Test" << std::endl;
ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType);
- xDocSh->DoHardRecalc(true);
CPPUNIT_ASSERT_MESSAGE("Failed to load named-ranges-globals.*", xDocSh.Is());
+
+ xDocSh->DoHardRecalc(true);
+
ScDocument* pDoc = xDocSh->GetDocument();
testRangeNameImpl(pDoc);
@@ -357,9 +359,11 @@ void ScFiltersTest::testContent()
rtl::OUString aFilterType(aFileFormats[i].pTypeName, strlen(aFileFormats[i].pTypeName), RTL_TEXTENCODING_UTF8);
std::cout << aFileFormats[i].pName << " Test" << std::endl;
ScDocShellRef xDocSh = load (aFilterName, aFileName, rtl::OUString(), aFilterType, aFileFormats[i].nFormatType);
- xDocSh->DoHardRecalc(true);
CPPUNIT_ASSERT_MESSAGE("Failed to load universal-content.*", xDocSh.Is());
+
+ xDocSh->DoHardRecalc(true);
+
ScDocument* pDoc = xDocSh->GetDocument();
testContentImpl(pDoc);
xDocSh->DoClose();
commit 2b4ceff9384198352df8540df4835379ed8cc23c
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 16:21:32 2012 +0200
filters_test needs more libraries now when it proceeds further
diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile
index 0412f33..84341ab 100644
--- a/android/qa/sc/Makefile
+++ b/android/qa/sc/Makefile
@@ -53,11 +53,13 @@ copy-stuff:
# Libs and UNO components that the tests need.
#
for F in $(strip \
+ analysislo \
basebmplo \
basegfxlo \
bootstrap.uno \
comphelpgcc3 \
configmgr.uno \
+ expwrap.uno \
fileacc \
fontconfig \
forlo \
@@ -84,6 +86,7 @@ copy-stuff:
mergedlo \
msfilterlo \
ooxlo \
+ reflection.uno \
reg \
saxlo \
sblo \
@@ -115,6 +118,7 @@ copy-stuff:
xcrlo \
xml2 \
xmlreader \
+ xstor \
); do \
$(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
done
commit b8ea7cff48e4d10e51bec8f2d595323982d8f51b
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 16:20:14 2012 +0200
Call lo_dlclose() on Android
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index 792f0cd..d600bb8 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -236,7 +236,11 @@ void SAL_CALL osl_unloadModule(oslModule hModule)
if (hModule)
{
#ifndef NO_DL_FUNCTIONS
+#ifdef ANDROID
+ int nRet = lo_dlclose(hModule);
+#else
int nRet = dlclose(hModule);
+#endif
#if OSL_DEBUG_LEVEL > 1
if (nRet != 0)
commit 2c11a8fed62ed6b3aefc2a00cc0ae9c40e9b4a94
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 16:19:17 2012 +0200
Add lo_dlclose()
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index b9ed8dc..1140515 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -960,6 +960,19 @@ lo_dladdr(void *addr,
}
__attribute__ ((visibility("default")))
+int
+lo_dlclose(void *handle)
+{
+ /* As we don't know when the reference count for a dlopened shared
+ * object drops to zero, we wouldn't know when to remove it from
+ * our list, so we can't call dlclose().
+ */
+ LOGI("lo_dlclose(%p)", handle);
+
+ return 0;
+}
+
+__attribute__ ((visibility("default")))
void *
lo_apkentry(const char *filename,
size_t *size)
diff --git a/sal/inc/osl/detail/android-bootstrap.h b/sal/inc/osl/detail/android-bootstrap.h
index 6539687..bd453b3 100644
--- a/sal/inc/osl/detail/android-bootstrap.h
+++ b/sal/inc/osl/detail/android-bootstrap.h
@@ -51,6 +51,8 @@ void *lo_dlsym(void *handle,
int lo_dladdr(void *addr,
Dl_info *info);
+int lo_dlclose(void *handle);
+
void *lo_apkentry(const char *filename,
size_t *size);
commit 6e2e4c4c674ad2b6d1b3aa3759c7c838a0b16728
Author: Tor Lillqvist <tlillqvist at suse.com>
Date: Tue Jan 31 15:24:06 2012 +0200
Log time taken by dlopen()
diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index b5a0a05..b9ed8dc 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <unistd.h>
#include <fcntl.h>
@@ -815,6 +816,8 @@ lo_dlopen(const char *library)
int i;
int found;
+ struct timeval tv0, tv1, tvdiff;
+
rover = loaded_libraries;
while (rover != NULL &&
strcmp(rover->name, library) != 0)
@@ -869,8 +872,13 @@ lo_dlopen(const char *library)
}
free_ptrarray((void **) needed);
+ gettimeofday(&tv0, NULL);
p = dlopen(full_name, RTLD_LOCAL);
- LOGI("dlopen(%s) = %p", full_name, p);
+ gettimeofday(&tv1, NULL);
+ timersub(&tv1, &tv0, &tvdiff);
+ LOGI("dlopen(%s) = %p, %ld.%03lds",
+ full_name, p,
+ (long) tvdiff.tv_sec, (long) tvdiff.tv_usec / 1000);
free(full_name);
if (p == NULL)
LOGE("lo_dlopen: Error from dlopen(%s): %s", library, dlerror());
More information about the Libreoffice-commits
mailing list