Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b9975229
Kaydet (Commit)
b9975229
authored
Mar 19, 2004
tarafından
Oliver Bolte
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
INTEGRATION: CWS qadev16 (1.6.12); FILE MERGED
2004/03/10 09:39:39 sw 1.6.12.1: #i24566#
üst
fc69474e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
36 deletions
+48
-36
ClParser.java
qadevOOo/runner/helper/ClParser.java
+48
-36
No files found.
qadevOOo/runner/helper/ClParser.java
Dosyayı görüntüle @
b9975229
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
*
*
* $RCSfile: ClParser.java,v $
* $RCSfile: ClParser.java,v $
*
*
* $Revision: 1.
6
$
* $Revision: 1.
7
$
*
*
* last change:$Date: 200
3-11-18 16:14:09
$
* last change:$Date: 200
4-03-19 14:29:03
$
*
*
* The Contents of this file are made available subject to the terms of
* The Contents of this file are made available subject to the terms of
* either of the following licenses
* either of the following licenses
...
@@ -58,51 +58,59 @@
...
@@ -58,51 +58,59 @@
*
*
*
*
************************************************************************/
************************************************************************/
package
helper
;
package
helper
;
import
lib.TestParameters
;
import
java.util.Properties
;
import
java.util.Properties
;
import
lib.TestParameters
;
/**
/**
* This class parses commandline Argument and stores <br>
* This class parses commandline Argument and stores <br>
* them into TestParameter
* them into TestParameter
*/
*/
public
class
ClParser
{
public
class
ClParser
{
/*
/*
* Parses the commandline argument and puts them<br>
* Parses the commandline argument and puts them<br>
* into the TestParameters
* into the TestParameters
*/
*/
public
void
getCommandLineParameter
(
TestParameters
param
,
String
[]
args
)
{
public
void
getCommandLineParameter
(
TestParameters
param
,
String
[]
args
)
{
Properties
mapping
=
getMapping
();
Properties
mapping
=
getMapping
();
boolean
isTestJob
=
false
;
boolean
isTestJob
=
false
;
for
(
int
i
=
0
;
i
<
args
.
length
;)
{
String
pName
=
getParameterFor
(
mapping
,
args
[
i
]).
trim
();
for
(
int
i
=
0
;
i
<
args
.
length
;)
{
String
pName
=
getParameterFor
(
mapping
,
args
[
i
]).
trim
();
String
pValue
=
""
;
String
pValue
=
""
;
if
(
pName
.
equals
(
"TestJob"
))
{
if
(
pName
.
equals
(
"TestJob"
))
{
pValue
=
args
[
i
].
trim
()+
" "
+
args
[
i
+
1
].
trim
();
if
(
args
.
length
>
(
i
+
1
))
{
i
+=
2
;
pValue
=
args
[
i
].
trim
()
+
" "
+
args
[
i
+
1
].
trim
();
}
i
+=
2
;
else
{
}
else
{
if
(
i
+
1
<
args
.
length
)
{
pValue
=
args
[
i
].
trim
()
+
" unknown"
;
pValue
=
args
[
i
+
1
].
trim
();
i
+=
2
;
}
}
else
{
if
((
i
+
1
)
<
args
.
length
)
{
pValue
=
args
[
i
+
1
].
trim
();
if
(
pValue
.
startsWith
(
"-"
))
{
if
(
pValue
.
startsWith
(
"-"
))
{
i
++;
i
++;
pValue
=
"yes"
;
pValue
=
"yes"
;
}
}
else
{
else
{
i
+=
2
;
i
+=
2
;
}
}
if
(
pName
.
equals
(
"TestDocumentPath"
))
{
if
(
pName
.
equals
(
"TestDocumentPath"
))
{
System
.
setProperty
(
"DOCPTH"
,
pValue
);
System
.
setProperty
(
"DOCPTH"
,
pValue
);
}
}
}
}
else
{
else
{
pValue
=
"yes"
;
pValue
=
"yes"
;
i
++;
i
++;
}
}
}
}
param
.
put
(
pName
,
pValue
);
param
.
put
(
pName
,
pValue
);
}
}
}
}
...
@@ -110,40 +118,43 @@ public class ClParser {
...
@@ -110,40 +118,43 @@ public class ClParser {
* This method returns the path to a Configuration file <br>
* This method returns the path to a Configuration file <br>
* if defined as command line parameter, an empty String elsewhere
* if defined as command line parameter, an empty String elsewhere
*/
*/
public
String
getIniPath
(
String
[]
args
)
{
public
String
getIniPath
(
String
[]
args
)
{
String
iniFile
=
""
;
String
iniFile
=
""
;
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
args
[
i
].
equals
(
"-ini"
))
{
if
(
args
[
i
].
equals
(
"-ini"
))
{
iniFile
=
args
[
i
+
1
];
iniFile
=
args
[
i
+
1
];
}
}
}
}
return
iniFile
;
return
iniFile
;
}
}
/*
/*
* This method maps commandline Parameters to TestParameters
* This method maps commandline Parameters to TestParameters
*/
*/
protected
Properties
getMapping
()
{
protected
Properties
getMapping
()
{
Properties
map
=
new
Properties
();
Properties
map
=
new
Properties
();
map
.
setProperty
(
"-cs"
,
"ConnectionString"
);
map
.
setProperty
(
"-cs"
,
"ConnectionString"
);
map
.
setProperty
(
"-tb"
,
"TestBase"
);
map
.
setProperty
(
"-tb"
,
"TestBase"
);
map
.
setProperty
(
"-tdoc"
,
"TestDocumentPath"
);
map
.
setProperty
(
"-tdoc"
,
"TestDocumentPath"
);
map
.
setProperty
(
"-objdsc"
,
"DescriptionPath"
);
map
.
setProperty
(
"-objdsc"
,
"DescriptionPath"
);
map
.
setProperty
(
"-cmd"
,
"AppExecutionCommand"
);
map
.
setProperty
(
"-cmd"
,
"AppExecutionCommand"
);
map
.
setProperty
(
"-o"
,
"TestJob"
);
map
.
setProperty
(
"-o"
,
"TestJob"
);
map
.
setProperty
(
"-sce"
,
"TestJob"
);
map
.
setProperty
(
"-sce"
,
"TestJob"
);
map
.
setProperty
(
"-aca"
,
"AdditionalConnectionArguments"
);
map
.
setProperty
(
"-aca"
,
"AdditionalConnectionArguments"
);
map
.
setProperty
(
"-xcl"
,
"ExclusionList"
);
map
.
setProperty
(
"-xcl"
,
"ExclusionList"
);
return
map
;
return
map
;
}
}
protected
String
getParameterFor
(
Properties
map
,
String
name
)
{
protected
String
getParameterFor
(
Properties
map
,
String
name
)
{
String
ret
=
map
.
getProperty
(
name
);
String
ret
=
map
.
getProperty
(
name
);
if
(
ret
==
null
)
{
if
(
ret
==
null
)
{
ret
=
name
.
substring
(
1
);
ret
=
name
.
substring
(
1
);
}
}
return
ret
;
return
ret
;
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment