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

java: inline some test properties

Change-Id: I8be2ee13652ed7223e41765811db577ecc1c85d6
üst a7d12921
...@@ -63,28 +63,14 @@ public class ListSelection extends integration.forms.TestCase ...@@ -63,28 +63,14 @@ 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;
for ( int i = 0; i < runs; ++i )
if ( interactiveTest )
{ {
log.println( "Round " + ( i + 1 ) + " of " + runs );
prepareDocument(); prepareDocument();
waitForUserInput(); impl_clickListBox();
closeDocumentByUI(); synchronized( this ) { this.wait( 1000 ); }
} closeDocument();
else
{
int runs = param.getInt( "Runs" );
if ( runs == 0 )
runs = 10;
for ( int i = 0; i < runs; ++i )
{
log.println( "Round " + ( i + 1 ) + " of " + runs );
prepareDocument();
impl_clickListBox();
synchronized( this ) { this.wait( 1000 ); }
closeDocument();
}
} }
} }
......
ThreadTimeOut=600000 ThreadTimeOut=600000
Interactive=false
Runs=5
...@@ -41,30 +41,13 @@ public class CfgParser ...@@ -41,30 +41,13 @@ public class CfgParser
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