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
a835b0af
Kaydet (Commit)
a835b0af
authored
Agu 16, 2012
tarafından
Liu Zhe
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#120510# - Move ant scripts from testgui to test module root
üst
3473dbf6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
142 additions
and
38 deletions
+142
-38
build.xml
test/build.xml
+9
-6
OpenOffice.java
test/testcommon/source/org/openoffice/test/OpenOffice.java
+38
-32
.classpath
test/testgui/.classpath
+2
-0
org.eclipse.jdt.core.prefs
test/testgui/.settings/org.eclipse.jdt.core.prefs
+13
-0
org.eclipse.jdt.launching.prefs
test/testgui/.settings/org.eclipse.jdt.launching.prefs
+2
-0
.classpath_linux
test/testuno/.classpath_linux
+13
-0
.classpath_win
test/testuno/.classpath_win
+5
-0
Classpath Builder.launch
test/testuno/.externalToolBuilders/Classpath Builder.launch
+16
-0
.project
test/testuno/.project
+14
-0
builder.xml
test/testuno/builder.xml
+30
-0
No files found.
test/build.xml
Dosyayı görüntüle @
a835b0af
...
@@ -96,9 +96,8 @@
...
@@ -96,9 +96,8 @@
</target>
</target>
<target
name=
"testuno.compile"
depends=
"testuno.init, prepare.junit"
>
<target
name=
"testuno.compile"
depends=
"testuno.init, prepare.junit"
>
<property
name=
"uno.jar.dir"
location=
"${openoffice.home}/../"
/>
<path
id=
"uno.classpath"
>
<path
id=
"uno.classpath"
>
<fileset
dir=
"${
uno.jar.dir
}"
erroronmissingdir=
"false"
>
<fileset
dir=
"${
openoffice.home
}"
erroronmissingdir=
"false"
>
<include
name=
"**/juh.jar"
/>
<include
name=
"**/juh.jar"
/>
<include
name=
"**/unoil.jar"
/>
<include
name=
"**/unoil.jar"
/>
<include
name=
"**/ridl.jar"
/>
<include
name=
"**/ridl.jar"
/>
...
@@ -161,7 +160,12 @@
...
@@ -161,7 +160,12 @@
</or>
</or>
</condition>
</condition>
<condition
property=
"install.build.skip"
>
<condition
property=
"install.build.skip"
>
<isset
property=
"openoffice.home"
/>
<or>
<isset
property=
"openoffice.home"
/>
<not>
<isset
property=
"openoffice.archive.dir"
/>
</not>
</or>
</condition>
</condition>
</target>
</target>
...
@@ -208,7 +212,8 @@
...
@@ -208,7 +212,8 @@
<fileset
dir=
"${openoffice.installation.dir}"
includes=
"**/*/soffice.bin"
followsymlinks=
"false"
/>
<fileset
dir=
"${openoffice.installation.dir}"
includes=
"**/*/soffice.bin"
followsymlinks=
"false"
/>
</path>
</path>
</pathconvert>
</pathconvert>
<dirname
property=
"openoffice.home"
file=
"${openoffice.bin}"
/>
<dirname
property=
"openoffice.bin.parent"
file=
"${openoffice.bin}"
/>
<property
name=
"openoffice.home"
location=
"${openoffice.bin.parent}/../"
/>
<fail
unless=
"openoffice.home"
/>
<fail
unless=
"openoffice.home"
/>
<echo>
Openoffice is installed to ${openoffice.home}
</echo>
<echo>
Openoffice is installed to ${openoffice.home}
</echo>
</target>
</target>
...
@@ -222,8 +227,6 @@
...
@@ -222,8 +227,6 @@
<mkdir
dir=
"${test.result}"
/>
<mkdir
dir=
"${test.result}"
/>
<mkdir
dir=
"${test.report}"
/>
<mkdir
dir=
"${test.report}"
/>
<mkdir
dir=
"${test.output}/temp"
/>
<mkdir
dir=
"${test.output}/temp"
/>
<property
file=
"${openoffice.home}/versionrc"
prefix=
"version"
/>
<property
file=
"${openoffice.home}/version.ini"
/>
<junit
fork=
"yes"
forkmode=
"once"
tempdir=
"${test.output}/temp"
printsummary=
"yes"
showoutput=
"false"
errorProperty=
"test.failed"
failureProperty=
"test.failed"
dir=
"."
>
<junit
fork=
"yes"
forkmode=
"once"
tempdir=
"${test.output}/temp"
printsummary=
"yes"
showoutput=
"false"
errorProperty=
"test.failed"
failureProperty=
"test.failed"
dir=
"."
>
<sysproperty
key=
"openoffice.home"
value=
"${openoffice.home}"
/>
<sysproperty
key=
"openoffice.home"
value=
"${openoffice.home}"
/>
...
...
test/testcommon/source/org/openoffice/test/OpenOffice.java
Dosyayı görüntüle @
a835b0af
...
@@ -23,6 +23,7 @@ package org.openoffice.test;
...
@@ -23,6 +23,7 @@ package org.openoffice.test;
import
java.io.File
;
import
java.io.File
;
import
java.net.MalformedURLException
;
import
java.net.MalformedURLException
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Properties
;
import
java.util.Properties
;
import
java.util.UUID
;
import
java.util.UUID
;
...
@@ -40,6 +41,17 @@ public class OpenOffice {
...
@@ -40,6 +41,17 @@ public class OpenOffice {
private
static
Logger
LOG
=
Logger
.
getLogger
(
OpenOffice
.
class
.
getName
());
private
static
Logger
LOG
=
Logger
.
getLogger
(
OpenOffice
.
class
.
getName
());
private
static
final
String
[]
DEFAULT_HOME
=
new
String
[]
{
"C:/Program Files/OpenOffice.org 3"
,
"C:/Program Files (x86)/OpenOffice.org 3"
,
"/Applications/OpenOffice.org.app/Contents"
,
"/opt/openoffice.org3"
,
};
private
static
final
String
USERHOME
=
System
.
getProperty
(
"user.home"
);
private
static
final
String
BIN
=
SystemUtil
.
isWindows
()
?
"program/soffice.exe"
:
SystemUtil
.
isMac
()
?
"MacOS/soffice.bin"
:
"program/soffice.bin"
;
private
static
final
String
SYSUSERCONFIG
=
SystemUtil
.
isWindows
()?
System
.
getenv
(
"APPDATA"
)
:
SystemUtil
.
isMac
()
?
USERHOME
+
"/Library/Application Support"
:
USERHOME
;
private
static
OpenOffice
defaultInstance
=
null
;
private
static
OpenOffice
defaultInstance
=
null
;
private
File
userInstallation
=
null
;
private
File
userInstallation
=
null
;
...
@@ -48,6 +60,8 @@ public class OpenOffice {
...
@@ -48,6 +60,8 @@ public class OpenOffice {
private
File
home
=
null
;
private
File
home
=
null
;
private
File
bin
=
null
;
private
ArrayList
<
String
>
args
=
new
ArrayList
<
String
>();
private
ArrayList
<
String
>
args
=
new
ArrayList
<
String
>();
private
ArrayList
<
String
>
registryModifications
=
new
ArrayList
<
String
>();
private
ArrayList
<
String
>
registryModifications
=
new
ArrayList
<
String
>();
...
@@ -62,13 +76,13 @@ public class OpenOffice {
...
@@ -62,13 +76,13 @@ public class OpenOffice {
private
String
id
=
"-"
+
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
private
String
id
=
"-"
+
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
public
OpenOffice
()
{
public
OpenOffice
()
{
this
(
null
);
this
(
null
);
}
}
/**
/**
* Construct Process with the home path of OpenOffice. The home is the
* Construct Process with the home path of OpenOffice.
* directory which contains soffice.bin.
*
*
* @param appHome
* @param appHome
*/
*/
...
@@ -78,47 +92,40 @@ public class OpenOffice {
...
@@ -78,47 +92,40 @@ public class OpenOffice {
if
(
appHome
==
null
)
if
(
appHome
==
null
)
appHome
=
System
.
getenv
(
"OPENOFFICE_HOME"
);
appHome
=
System
.
getenv
(
"OPENOFFICE_HOME"
);
if
(
appHome
==
null
)
{
if
(
appHome
==
null
)
{
if
(
SystemUtil
.
isWindows
())
{
// Search in the classpath
appHome
=
"C:/Program Files/OpenOffice.org 3/program"
;
try
{
if
(!
new
File
(
appHome
).
exists
())
URL
url
=
getClass
().
getClassLoader
().
getResource
(
BIN
);
appHome
=
"C:/Program Files (x86)/OpenOffice.org 3/program"
;
File
file
=
new
File
(
url
.
toURI
())
;
}
else
if
(
SystemUtil
.
isMac
())
{
if
(
file
.
exists
())
appHome
=
"/Applications/OpenOffice.org.app/Contents/MacOS"
;
appHome
=
file
.
getParentFile
().
getParentFile
().
getAbsolutePath
()
;
}
else
{
}
catch
(
Exception
e
)
{
appHome
=
"/opt/openoffice.org3/program"
;
// ignore
}
}
}
}
home
=
new
File
(
appHome
);
if
(
appHome
==
null
)
{
for
(
int
i
=
0
;
i
<
DEFAULT_HOME
.
length
;
i
++)
if
(
new
File
(
DEFAULT_HOME
[
i
]).
exists
())
appHome
=
DEFAULT_HOME
[
i
];
}
File
bootstrapFile
=
new
File
(
home
,
"bootstraprc"
);
home
=
new
File
(
appHome
);
bin
=
new
File
(
appHome
,
BIN
);
File
binParent
=
bin
.
getParentFile
();
File
bootstrapFile
=
new
File
(
binParent
,
"bootstraprc"
);
if
(!
bootstrapFile
.
exists
())
if
(!
bootstrapFile
.
exists
())
bootstrapFile
=
new
File
(
home
,
"bootstrap.ini"
);
bootstrapFile
=
new
File
(
binParent
,
"bootstrap.ini"
);
if
(!
bootstrapFile
.
exists
())
if
(!
bootstrapFile
.
exists
())
throw
new
Error
(
"OpenOffice can not be found or it's broken. Testing can not be performed. "
+
throw
new
Error
(
"OpenOffice can not be found or it's broken. Testing can not be performed. "
+
"Use system property openoffice.home to specify the correct location of OpenOffice."
);
"Use system property openoffice.home to specify the correct location of OpenOffice."
);
Properties
props
=
FileUtil
.
loadProperties
(
bootstrapFile
);
Properties
props
=
FileUtil
.
loadProperties
(
bootstrapFile
);
String
defaultUserInstallationPath
=
props
.
getProperty
(
"UserInstallation"
);
String
defaultUserInstallationPath
=
props
.
getProperty
(
"UserInstallation"
).
replace
(
"$ORIGIN"
,
binParent
.
getAbsolutePath
()).
replace
(
"$SYSUSERCONFIG"
,
SYSUSERCONFIG
);
String
sysUserConfig
=
null
;
if
(
SystemUtil
.
isWindows
())
{
sysUserConfig
=
System
.
getenv
(
"APPDATA"
);
}
else
if
(
SystemUtil
.
isMac
())
{
sysUserConfig
=
System
.
getProperty
(
"user.home"
)
+
"/Library/Application Support"
;
}
else
{
sysUserConfig
=
System
.
getProperty
(
"user.home"
);
}
defaultUserInstallationPath
=
defaultUserInstallationPath
.
replace
(
"$ORIGIN"
,
home
.
getAbsolutePath
()).
replace
(
"$SYSUSERCONFIG"
,
sysUserConfig
);
defaultUserInstallation
=
new
File
(
defaultUserInstallationPath
);
defaultUserInstallation
=
new
File
(
defaultUserInstallationPath
);
File
versionFile
=
new
File
(
home
,
"versionrc"
);
File
versionFile
=
new
File
(
binParent
,
"versionrc"
);
if
(!
versionFile
.
exists
())
versionFile
=
new
File
(
home
,
"version.ini"
);
if
(!
versionFile
.
exists
())
if
(!
versionFile
.
exists
())
throw
new
Error
(
"OpenOffice can not be found or it's broken. Testing can not be performed. "
+
versionFile
=
new
File
(
binParent
,
"version.ini"
);
"Use system property openoffice.home to specify the correct location of OpenOffice."
);
versionProps
=
FileUtil
.
loadProperties
(
versionFile
);
versionProps
=
FileUtil
.
loadProperties
(
versionFile
);
addArgs
(
id
);
addArgs
(
id
);
}
}
...
@@ -258,9 +265,8 @@ public class OpenOffice {
...
@@ -258,9 +265,8 @@ public class OpenOffice {
return
;
return
;
}
}
String
bin
=
home
.
getAbsolutePath
()
+
File
.
separatorChar
+
(
SystemUtil
.
isWindows
()
?
"soffice.exe"
:
"soffice.bin"
);
ArrayList
<
String
>
cmds
=
new
ArrayList
<
String
>();
ArrayList
<
String
>
cmds
=
new
ArrayList
<
String
>();
cmds
.
add
(
bin
);
cmds
.
add
(
bin
.
getAbsolutePath
()
);
if
(
automationPort
>
0
)
{
if
(
automationPort
>
0
)
{
cmds
.
add
(
"-automationport="
+
automationPort
);
cmds
.
add
(
"-automationport="
+
automationPort
);
cmds
.
add
(
"-enableautomation"
);
cmds
.
add
(
"-enableautomation"
);
...
...
test/testgui/.classpath
Dosyayı görüntüle @
a835b0af
...
@@ -5,5 +5,7 @@
...
@@ -5,5 +5,7 @@
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
combineaccessrules=
"false"
kind=
"src"
path=
"/testcommon"
/>
<classpathentry
combineaccessrules=
"false"
kind=
"src"
path=
"/testcommon"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.junit.JUNIT_CONTAINER/4"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.junit.JUNIT_CONTAINER/4"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home"
/>
<classpathentry
kind=
"var"
path=
"JRE_LIB"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
</classpath>
test/testgui/.settings/org.eclipse.jdt.core.prefs
0 → 100644
Dosyayı görüntüle @
a835b0af
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
org.eclipse.jdt.core.builder.invalidClasspath=abort
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=warning
test/testgui/.settings/org.eclipse.jdt.launching.prefs
0 → 100644
Dosyayı görüntüle @
a835b0af
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
test/testuno/.classpath_linux
0 → 100644
Dosyayı görüntüle @
a835b0af
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
kind=
"src"
path=
"source"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
combineaccessrules=
"false"
kind=
"src"
path=
"/testcommon"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.junit.JUNIT_CONTAINER/4"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/basis-link/program/classes/unoil.jar"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/basis-link/ure-link/share/java/jurt.jar"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/basis-link/ure-link/share/java/juh.jar"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/basis-link/ure-link/share/java/ridl.jar"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
test/testuno/.classpath
→
test/testuno/.classpath
_win
Dosyayı görüntüle @
a835b0af
...
@@ -4,5 +4,10 @@
...
@@ -4,5 +4,10 @@
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER"
/>
<classpathentry
combineaccessrules=
"false"
kind=
"src"
path=
"/testcommon"
/>
<classpathentry
combineaccessrules=
"false"
kind=
"src"
path=
"/testcommon"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.junit.JUNIT_CONTAINER/4"
/>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.junit.JUNIT_CONTAINER/4"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/Basis/program/classes/unoil.jar"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/URE/java/jurt.jar"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/URE/java/juh.jar"
/>
<classpathentry
kind=
"var"
path=
"openoffice.home/URE/java/ridl.jar"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
<classpathentry
kind=
"output"
path=
"bin"
/>
</classpath>
</classpath>
test/testuno/.externalToolBuilders/Classpath Builder.launch
0 → 100644
Dosyayı görüntüle @
a835b0af
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration
type=
"org.eclipse.ant.AntBuilderLaunchConfigurationType"
>
<booleanAttribute
key=
"org.eclipse.ant.ui.ATTR_TARGETS_UPDATED"
value=
"true"
/>
<booleanAttribute
key=
"org.eclipse.ant.ui.DEFAULT_VM_INSTALL"
value=
"false"
/>
<booleanAttribute
key=
"org.eclipse.ant.uiSET_INPUTHANDLER"
value=
"false"
/>
<stringAttribute
key=
"org.eclipse.debug.core.ATTR_REFRESH_SCOPE"
value=
"${workspace}"
/>
<booleanAttribute
key=
"org.eclipse.debug.core.capture_output"
value=
"false"
/>
<booleanAttribute
key=
"org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON"
value=
"false"
/>
<booleanAttribute
key=
"org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND"
value=
"false"
/>
<stringAttribute
key=
"org.eclipse.jdt.launching.CLASSPATH_PROVIDER"
value=
"org.eclipse.ant.ui.AntClasspathProvider"
/>
<booleanAttribute
key=
"org.eclipse.jdt.launching.DEFAULT_CLASSPATH"
value=
"true"
/>
<stringAttribute
key=
"org.eclipse.jdt.launching.PROJECT_ATTR"
value=
"testuno"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_LOCATION"
value=
"${workspace_loc:/testuno/builder.xml}"
/>
<stringAttribute
key=
"org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS"
value=
"incremental,auto,"
/>
<booleanAttribute
key=
"org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED"
value=
"true"
/>
</launchConfiguration>
test/testuno/.project
Dosyayı görüntüle @
a835b0af
...
@@ -5,6 +5,20 @@
...
@@ -5,6 +5,20 @@
<projects>
<projects>
</projects>
</projects>
<buildSpec>
<buildSpec>
<buildCommand>
<name>
org.eclipse.ui.externaltools.ExternalToolBuilder
</name>
<triggers>
auto,full,incremental,
</triggers>
<arguments>
<dictionary>
<key>
LaunchConfigHandle
</key>
<value>
<
project
>
/.externalToolBuilders/Classpath Builder.launch
</value>
</dictionary>
<dictionary>
<key>
incclean
</key>
<value>
true
</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
<arguments>
...
...
test/testuno/builder.xml
0 → 100644
Dosyayı görüntüle @
a835b0af
<?xml version="1.0"?>
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<project
basedir=
"."
default=
"config.classpath"
>
<target
name=
"config.classpath"
>
<condition
property=
"classpath.file"
value=
".classpath_win"
else=
".classpath_linux"
>
<os
family=
"windows"
/>
</condition>
<copy
file=
"${classpath.file}"
tofile=
".classpath"
/>
</target>
</project>
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