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
f8ec51cc
Kaydet (Commit)
f8ec51cc
authored
Ock 15, 2017
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
boil down the use of OPERATING_SYSTEM to its unorc/uno.ini use
Change-Id: I9f0f98c989cb7ecf6227154e1d81d49abade66c2
üst
29b13a24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
78 deletions
+8
-78
CfgParser.java
qadevOOo/runner/helper/CfgParser.java
+0
-23
UnoProvider.java
qadevOOo/runner/helper/UnoProvider.java
+1
-9
TestParameters.java
qadevOOo/runner/lib/TestParameters.java
+5
-22
PropertyName.java
qadevOOo/runner/util/PropertyName.java
+2
-24
No files found.
qadevOOo/runner/helper/CfgParser.java
Dosyayı görüntüle @
f8ec51cc
...
...
@@ -81,29 +81,6 @@ public class CfgParser
}
debug
=
param
.
getBool
(
PropertyName
.
DEBUG_IS_ACTIVE
);
//check for platform dependent parameters
//this would have a $OperatingSystem as prefix
String
os
=
(
String
)
param
.
get
(
PropertyName
.
OPERATING_SYSTEM
);
if
(
os
!=
null
&&
os
.
length
()
>
1
)
{
Map
<
String
,
Object
>
aux
=
new
HashMap
<
String
,
Object
>();
for
(
Iterator
<
Map
.
Entry
<
String
,
Object
>>
it
=
param
.
entrySet
().
iterator
();
it
.
hasNext
();)
{
Map
.
Entry
<
String
,
Object
>
entry
=
it
.
next
();
String
key
=
entry
.
getKey
();
if
(
key
.
startsWith
(
os
))
{
Object
oldValue
=
entry
.
getValue
();
String
newKey
=
key
.
substring
(
os
.
length
()
+
1
);
it
.
remove
();
aux
.
put
(
newKey
,
oldValue
);
}
}
param
.
putAll
(
aux
);
}
}
private
Properties
getProperties
(
String
name
)
...
...
qadevOOo/runner/helper/UnoProvider.java
Dosyayı görüntüle @
f8ec51cc
...
...
@@ -109,15 +109,7 @@ public class UnoProvider implements AppProvider {
if
(
unorcName
==
null
)
{
String
office
=
(
String
)
param
.
get
(
"AppExecutionCommand"
);
// determine unorc name: unorc or uno.ini on windows
String
opSystem
=
(
String
)
param
.
get
(
PropertyName
.
OPERATING_SYSTEM
);
if
(
opSystem
!=
null
&&
opSystem
.
equalsIgnoreCase
(
PropertyName
.
WNTMSCI
))
{
unorcName
=
"uno.ini"
;
}
else
{
unorcName
=
"unorc"
;
}
if
(
office
==
null
)
return
null
;
unorcName
=
(
String
)
param
.
get
(
PropertyName
.
UNORC_NAME
);
// use '/', because this will be a URL in any case.
unorcName
=
office
.
substring
(
0
,
office
.
indexOf
(
"program"
)+
7
)
+
"/"
+
unorcName
;
...
...
qadevOOo/runner/lib/TestParameters.java
Dosyayı görüntüle @
f8ec51cc
...
...
@@ -159,7 +159,7 @@ public class TestParameters extends HashMap<String,Object> {
put
(
PropertyName
.
AUTO_RESTART
,
Boolean
.
FALSE
);
// get the operating system
put
(
PropertyName
.
OPERATING_SYSTEM
,
getSOCompatibleOS
Name
());
put
(
PropertyName
.
UNORC_NAME
,
getUnoRc
Name
());
//For compatibility Reasons
System
.
setProperty
(
"DOCPTH"
,
DefaultTestDocumentPath
);
...
...
@@ -193,31 +193,14 @@ public class TestParameters extends HashMap<String,Object> {
}
/**
* Convert the system dependent operating system name to a name according
* to OOo rules.
* @return A valid OS name, or "" if the name is not known.
* @return The uno rc file name uno.ini for windows and unorc for everything else
*/
private
String
get
SOCompatibleOS
Name
()
{
private
String
get
UnoRc
Name
()
{
String
osname
=
System
.
getProperty
(
"os.name"
).
toLowerCase
();
String
osarch
=
System
.
getProperty
(
"os.arch"
);
String
operatingSystem
=
""
;
if
(
osname
.
indexOf
(
"windows"
)>-
1
)
{
operatingSystem
=
PropertyName
.
WNTMSCI
;
}
else
if
(
osname
.
indexOf
(
"linux"
)>-
1
||
osname
.
indexOf
(
"kfreebsd"
)>-
1
)
{
operatingSystem
=
PropertyName
.
UNXLNGI
;
}
else
if
(
osname
.
indexOf
(
"sunos"
)>-
1
)
{
if
(
osarch
.
equals
(
"x86"
))
{
operatingSystem
=
PropertyName
.
UNXSOLI
;
}
else
{
operatingSystem
=
PropertyName
.
UNXSOLS
;
}
}
else
if
(
osname
.
indexOf
(
"mac"
)>-
1
)
{
operatingSystem
=
PropertyName
.
UNXMACXI
;
}
else
{
System
.
out
.
println
(
"ERROR: not supported platform: "
+
osname
);
System
.
exit
(
1
);
return
"uno.ini"
;
}
return
operatingSystem
;
return
"unorc"
;
}
}
// finish class TestParamenters
qadevOOo/runner/util/PropertyName.java
Dosyayı görüntüle @
f8ec51cc
...
...
@@ -93,9 +93,9 @@ public interface PropertyName {
*/
String
THREAD_TIME_OUT
=
"ThreadTimeOut"
;
/**
* parameter name: "
OperatingSystem
"
* parameter name: "
UnoRcName
"
*/
String
OPERATING_SYSTEM
=
"OperatingSystem
"
;
String
UNORC_NAME
=
"UnoRcName
"
;
/**
* parameter name: "AutoRestart"
* If this parameter is <CODE>true</CODE> the <CODE>OfficeProvider</CODE> tries
...
...
@@ -114,26 +114,4 @@ public interface PropertyName {
* path to the source root of OpenOffice.org
*/
String
SRC_ROOT
=
"SRC_ROOT"
;
/**
* internal only, no parameter
*/
String
WNTMSCI
=
"wntmsci"
;
/**
* internal only, no parameter
*/
String
UNXLNGI
=
"unxlngi"
;
/**
* internal only, no parameter
*/
String
UNXSOLS
=
"unxsols"
;
/**
* internal only, no parameter
*/
String
UNXSOLI
=
"unxsoli"
;
/**
* internal only, no parameter
*/
String
UNXMACXI
=
"unxmacxi"
;
}
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