Kaydet (Commit) 9b8fb077 authored tarafından Noel Grandin's avatar Noel Grandin

java: inline some test properties

Change-Id: I8be2ee13652ed7223e41765811db577ecc1c85d6
üst a7d12921
...@@ -63,20 +63,7 @@ public class ListSelection extends integration.forms.TestCase ...@@ -63,20 +63,7 @@ public class ListSelection extends integration.forms.TestCase
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
public void checkUserListSelection() throws com.sun.star.uno.Exception, java.lang.Exception public void checkUserListSelection() throws com.sun.star.uno.Exception, java.lang.Exception
{ {
boolean interactiveTest = param.getBool( "Interactive" ); int runs = 5;
if ( interactiveTest )
{
prepareDocument();
waitForUserInput();
closeDocumentByUI();
}
else
{
int runs = param.getInt( "Runs" );
if ( runs == 0 )
runs = 10;
for ( int i = 0; i < runs; ++i ) for ( int i = 0; i < runs; ++i )
{ {
log.println( "Round " + ( i + 1 ) + " of " + runs ); log.println( "Round " + ( i + 1 ) + " of " + runs );
...@@ -86,7 +73,6 @@ public class ListSelection extends integration.forms.TestCase ...@@ -86,7 +73,6 @@ public class ListSelection extends integration.forms.TestCase
closeDocument(); closeDocument();
} }
} }
}
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
final private void impl_clickListBox() final private void impl_clickListBox()
......
ThreadTimeOut=600000 ThreadTimeOut=600000
Interactive=false
Runs=5
...@@ -40,31 +40,14 @@ public class CfgParser ...@@ -40,31 +40,14 @@ public class CfgParser
private String iniFile = ""; private String iniFile = "";
public CfgParser(String ini) public CfgParser(String ini)
{
if (ini != null)
{ {
this.iniFile = ini; this.iniFile = ini;
} }
}
public void getIniParameters(TestParameters param) public void getIniParameters(TestParameters param)
{ {
debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE); debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
Properties cfg = null; Properties cfg = getProperties(iniFile);
if (iniFile.length() == 0)
{
//no iniFile given, search one in the users home directory
cfg = getProperties(getDefaultFileName(true));
//try to search the user dir if no iniFile could be found yet
if (cfg == null)
{
cfg = getProperties(getDefaultFileName(false));
}
}
else
{
cfg = getProperties(iniFile);
}
if (cfg != null) if (cfg != null)
{ {
...@@ -161,28 +144,4 @@ public class CfgParser ...@@ -161,28 +144,4 @@ public class CfgParser
return prop; return prop;
} }
private String getDefaultFileName(boolean home)
{
String fileSeparator = System.getProperty("file.separator");
String path = "";
if (home)
{
//look inside the home directory
path = System.getProperty("user.home");
}
else
{
path = System.getProperty("user.dir");
}
if (fileSeparator.equals("/"))
{
//suppose I'm on Unix-platform
return path + fileSeparator + ".runner.props";
}
else
{
//suppose I'm on Windows
return path + fileSeparator + "runner.props";
}
}
} }
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