[Libreoffice-commits] core.git: 2 commits - jvmfwk/plugins smoketest/data
Michael Stahl
mstahl at redhat.com
Thu Sep 11 07:50:34 PDT 2014
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 16 ++++++++++++++++
smoketest/data/Basic/Standard/Test_10er.xml | 15 +++++++++------
2 files changed, 25 insertions(+), 6 deletions(-)
New commits:
commit c5cdcd8f5ac16b571e083d3222e7447e5c5ed03a
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Sep 11 16:44:51 2014 +0200
jvmfwk: print a warning if running java fa
Change-Id: Ibfcd6678ed1503cfab0881f3ec67c4c158d798cb
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 4e46a67..0815ea8 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -390,12 +390,16 @@ bool getJavaProps(const OUString & exePath,
OUString sThisLib;
if (osl_getModuleURLFromAddress((void *) (sal_IntPtr)& getJavaProps,
& sThisLib.pData) == sal_False)
+ {
return false;
+ }
sThisLib = getDirFromFile(sThisLib);
OUString sClassPath;
if (osl_getSystemPathFromFileURL(sThisLib.pData, & sClassPath.pData)
!= osl_File_E_None)
+ {
return false;
+ }
#ifdef MACOSX
if (sClassPath.endsWith("/"))
@@ -456,6 +460,8 @@ bool getJavaProps(const OUString & exePath,
{
JFW_TRACE2("[Java framework] Execution failed. \n");
*bProcessRun = false;
+ SAL_WARN("jfw",
+ "osl_executeProcess failed (" << ret << "): \"" << exePath << "\"");
return ret;
}
else
@@ -885,7 +891,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
OUString sResolvedDir = resolveDirPath(path);
// If this path is invalid then there is no chance to find a JRE here
if (sResolvedDir.isEmpty())
+ {
return 0;
+ }
//check if the directory path is good, that is a JRE was already recognized.
//Then we need not detect it again
@@ -936,13 +944,17 @@ rtl::Reference<VendorBase> getJREInfoByPath(
//The file path (to java exe) is not valid
cit_path ifull = find(vecBadPaths.begin(), vecBadPaths.end(), sFullPath);
if (ifull == vecBadPaths.end())
+ {
vecBadPaths.push_back(sFullPath);
+ }
continue;
}
cit_path ifile = find(vecBadPaths.begin(), vecBadPaths.end(), sFilePath);
if (ifile != vecBadPaths.end())
+ {
continue;
+ }
MapIt entry = mapJREs.find(sFilePath);
if (entry != mapJREs.end())
@@ -1008,7 +1020,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
if (props.empty())
+ {
return rtl::Reference<VendorBase>();
+ }
//find java.vendor property
typedef vector<pair<OUString, OUString> >::const_iterator c_ip;
@@ -1040,7 +1054,9 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
}
if (!ret.is())
+ {
vecBadPaths.push_back(sFilePath);
+ }
else
{
JFW_TRACE2(OUString("[Java framework] sunjavaplugin")
commit fd35ddd3e1cf16876bbc57d29c7472e551304f0f
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Sep 11 16:35:06 2014 +0200
smoketest: run the extension test first
With clang 3.4 ASAN there is the problem that the smoketest fails if run
in "make check" while trying to start the JVM, in getJavaProps()
it forks a "java" process and that fails due to lack of memory.
Avoid that problem by running the extension test first, when there is
only one application loaded, so the process is using much less memory.
Change-Id: I7e8bdc6ceea65b212f376943c7814ad1cf28675d
diff --git a/smoketest/data/Basic/Standard/Test_10er.xml b/smoketest/data/Basic/Standard/Test_10er.xml
index 534abe0..67e5e40 100644
--- a/smoketest/data/Basic/Standard/Test_10er.xml
+++ b/smoketest/data/Basic/Standard/Test_10er.xml
@@ -160,6 +160,13 @@ DIM nStrPos as Long
GlobalTestLog = OpenLogDat (sLogFileName)
call WriteTestSequence
+
+ ' Do extension test first to avoid OOM with ASAN
+ if bMakeExtensionTest then
+ gCurrentDocTest = frmExtension
+ call Test_Ext.TestExtensions
+ end if
+
if bMakeWriterTest then
gCurrentDocTest = frmWriter
call MakeDocTest
@@ -196,10 +203,6 @@ DIM nStrPos as Long
gCurrentDocTest = frmDataBase
call Test_DB.TestDB
end if
- if bMakeExtensionTest then
- gCurrentDocTest = frmExtension
- call Test_Ext.TestExtensions
- end if
Close #GlobalTestLog
GlobalTestLog = 0
@@ -208,6 +211,8 @@ end Sub
Sub WriteTestSequence
Print #GlobalTestLog, "Sequence of testing"
+ if bMakeExtensionTest then
+ WriteExtensionTests ("Extension : ", GlobalTestLog)
if bMakeWriterTest then
WriteTests ("writer : ", true, GlobalTestLog)
end if
@@ -235,8 +240,6 @@ Sub WriteTestSequence
if bMakeDBTest then
WriteDBTests ("Database : ", GlobalTestLog)
end if
- if bMakeExtensionTest then
- WriteExtensionTests ("Extension : ", GlobalTestLog)
end if
Print #GlobalTestLog, "testclosure : setup, write_status"
More information about the Libreoffice-commits
mailing list