summaryrefslogtreecommitdiff
path: root/testautomation/global
diff options
context:
space:
mode:
authormarc <marc@msc-ThinkPad-X201>2011-03-31 13:21:06 +0200
committermarc <marc@msc-ThinkPad-X201>2011-03-31 13:21:06 +0200
commit73ab31cd8ff9199678df31d0c500a58ff46303b0 (patch)
treefa6f46ac3efa376dc1b6ca03a395db2a479203e1 /testautomation/global
parent36979f1c9e43c42e62b0ad5a32b7abb2fc425b5b (diff)
check also if the given gPrivateEnvironmentLocation is a path and not a file
Diffstat (limited to 'testautomation/global')
-rw-r--r--testautomation/global/system/includes/iniinfo.inc31
1 files changed, 21 insertions, 10 deletions
diff --git a/testautomation/global/system/includes/iniinfo.inc b/testautomation/global/system/includes/iniinfo.inc
index 3423584253fd..e187f77e4a57 100644
--- a/testautomation/global/system/includes/iniinfo.inc
+++ b/testautomation/global/system/includes/iniinfo.inc
@@ -122,27 +122,38 @@ sub GetIniInformation
call sCheckValgrindStatus()
' set a global path for custom scripts outside of current environment
gPrivateEnvironmentLocation = getIniValue(gTesttoolIni, "PrivateEnvironment", "Current")
- if (gPrivateEnvironmentLocation <> "" AND gPrivateEnvironmentLocation <> ".") then
+ if (gPrivateEnvironmentLocation <> "" AND gPrivateEnvironmentLocation <> ".") then
' check if the gPrivateEnvironmentLocation path exists
if fileExists(gPrivateEnvironmentLocation) then
- ' check if the path ends with a path sign and add the path sign if not
- if (Right(gPrivateEnvironmentLocation,1) <> gPathSigne) then
- gPrivateEnvironmentLocation = gPrivateEnvironmentLocation & gPathSigne
- endif
+ if getAttr(gPrivateEnvironmentLocation) = 16 then
+ ' check if the path ends with a path sign and add the path sign if not
+ if (Right(gPrivateEnvironmentLocation,1) <> gPathSigne) then
+ gPrivateEnvironmentLocation = gPrivateEnvironmentLocation & gPathSigne
+ endif
+ else
+ qaErrorLog "[PrivateEnvironment] you need to specify a path"
+ gPrivateEnvironmentLocation = ""
+ endif
else
' check if the gTesttoolPath plus the gPrivateEnvironmentLocation path exists
' f.e. this is for a relative path
if fileExists(gTesttoolPath & gPrivateEnvironmentLocation) then
+ ' check if the gPrivateEnvironmentLocation is a path
gPrivateEnvironmentLocation = gTesttoolPath & gPrivateEnvironmentLocation
- ' check if the path ends with a path sign and add the path sign if not
- if (Right(gPrivateEnvironmentLocation,1) <> gPathSigne) then
- gPrivateEnvironmentLocation = gPrivateEnvironmentLocation & gPathSigne
- endif
+ if getAttr(gPrivateEnvironmentLocation) = 16 then
+ ' check if the path ends with a path sign and add the path sign if not
+ if (Right(gPrivateEnvironmentLocation,1) <> gPathSigne) then
+ gPrivateEnvironmentLocation = gPrivateEnvironmentLocation & gPathSigne
+ endif
+ else
+ qaErrorLog "[PrivateEnvironment] you need to specify a path"
+ gPrivateEnvironmentLocation = ""
+ endif
else
qaErrorLog "[PrivateEnvironment] defined in: '" & gTesttoolIni & "', but the path '" & gPrivateEnvironmentLocation & "'does not exist!"
gPrivateEnvironmentLocation = ""
endif
- end if
+ end if
else
gPrivateEnvironmentLocation = ""
end if