summaryrefslogtreecommitdiff
path: root/qadevOOo/runner
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-22 15:08:30 +0200
committerNoel Grandin <noel@peralex.com>2015-01-13 08:42:56 +0200
commit9b8fb077d26883d3749785803f5a9138d7ba0d29 (patch)
tree3b1d649abe86bafa5649a81b96668032273adbcb /qadevOOo/runner
parenta7d1292194054cd6842573054b07f046e600b6ec (diff)
java: inline some test properties
Change-Id: I8be2ee13652ed7223e41765811db577ecc1c85d6
Diffstat (limited to 'qadevOOo/runner')
-rw-r--r--qadevOOo/runner/helper/CfgParser.java45
1 files changed, 2 insertions, 43 deletions
diff --git a/qadevOOo/runner/helper/CfgParser.java b/qadevOOo/runner/helper/CfgParser.java
index d6cf0e60a762..7c7e17a208c0 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -41,30 +41,13 @@ public class CfgParser
public CfgParser(String ini)
{
- if (ini != null)
- {
- this.iniFile = ini;
- }
+ this.iniFile = ini;
}
public void getIniParameters(TestParameters param)
{
debug = param.getBool(PropertyName.DEBUG_IS_ACTIVE);
- Properties cfg = null;
- 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);
- }
+ Properties cfg = getProperties(iniFile);
if (cfg != null)
{
@@ -161,28 +144,4 @@ public class CfgParser
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";
- }
- }
}