forked from orientechnologies/orientdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·206 lines (176 loc) · 9.64 KB
/
build.xml
File metadata and controls
executable file
·206 lines (176 loc) · 9.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 1999-2010 Luca Garulli - LICENSE: Apache 2.0 -->
<project basedir="." default="compile" name="orientdb-tests">
<property name="project.jar-classpath" value="orientdb-client-${version}.jar orientdb-client-${version}.jar"/>
<property name="project.src" value="src/test/java"/>
<property name="project.build" value="target/test-classes"/>
<import file="../_base/base-build.xml"/>
<taskdef resource="testngtasks" classpath="lib/testng-5.10-jdk15.jar"/>
<target name="test"
depends="test-memory, test-local, test-plocal, test-remote">
</target>
<target name="test-init">
<copy todir="${project.build}">
<fileset dir="src/test/java">
<include name="**/*.xml"/>
</fileset>
</copy>
<replace dir="${project.build}/com/orientechnologies/orient/test/database/auto">
<include name="*-test-db-from-scratch.xml"/>
<exclude name="paginated-local-test-db-from-scratch.xml"/>
<replacefilter token="@PATH@" value="${orient.path}/databases/demo"/>
<replacefilter token="@URL@" value="local:${orient.path}/databases/demo"/>
</replace>
<replace dir="${project.build}/com/orientechnologies/orient/test/database/auto">
<include name="paginated-local-test-db-from-scratch.xml"/>
<replacefilter token="@PATH@" value="${orient.path}/databases/demo"/>
<replacefilter token="@URL@" value="plocal:${orient.path}/databases/demo"/>
</replace>
</target>
<target name="test-memory" depends="test-init">
<echo>EXECUTING TESTS USING MEMORY DATABASE: memory:demo</echo>
<testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
<jvmarg value="-Xmx2G"/>
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
includes="memory-test-db-from-scratch.xml"/>
</testng>
</target>
<target name="test-local" depends="test-init">
<echo>EXECUTING TESTS USING LOCAL DATABASE: local:${orient.path}/databases/demo</echo>
<testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
<jvmarg value="-Xmx2G"/>
<jvmarg value="-Dstorage.lockTimeout=60000"/>
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
includes="local-test-db-from-scratch.xml"/>
</testng>
</target>
<target name="test-plocal" depends="test-init">
<echo>EXECUTING TESTS USING PAGINATED LOCAL DATABASE: plocal:${orient.path}/databases/demo</echo>
<testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
<jvmarg value="-Xmx2G"/>
<jvmarg value="-Dstorage.lockTimeout=60000"/>
<jvmarg value="-Dstorage.makeFullCheckpointAfterCreate=false"/>
<jvmarg value="-Dstorage.makeFullCheckpointAfterClusterCreate=false"/>
<jvmarg value="-Dstorage.wal.syncOnPageFlush=false"/>
<jvmarg value="-Dstorage.configuration.syncOnUpdate=false"/>
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
includes="paginated-local-test-db-from-scratch.xml"/>
</testng>
</target>
<target name="test-local-lh" depends="test-init">
<echo>EXECUTING TESTS USING LOCAL DATABASE and LH data cluster: local:${orient.path}/databases/demo</echo>
<testng outputDir="target/test-output" haltOnFailure="true" verbose="2">
<jvmarg value="-Xmx2G"/>
<jvmarg value="-Dfile.cluster.useLHPEPS=true"/>
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
includes="local-test-db-from-scratch.xml"/>
</testng>
</target>
<target name="test-remote" depends="test-init">
<echo>STARTING REMOTE ORIENTDB SERVER INSTANCE...</echo>
<exec dir="../${orient.path}/bin" executable="cmd" spawn="true" osfamily="windows">
<env key="JAVA_OPTS"
value="-Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=10005 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dstorage.makeFullCheckpointAfterCreate=false -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false -Dstorage.configuration.syncOnUpdate=false"/>
<env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
<arg value="/c start server.bat"/>
</exec>
<exec dir="../${orient.path}/bin" executable="sh" spawn="true" osfamily="unix">
<env key="JAVA_OPTS"
value="-Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.port=10005 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dstorage.makeFullCheckpointAfterCreate=false -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false -Dstorage.configuration.syncOnUpdate=false"/>
<env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
<arg value="./server.sh"/>
</exec>
<echo>WAITING FOR SERVER STARTUP...</echo>
<sleep seconds="6"/>
<echo>EXECUTING TESTS USING REMOTE DATABASE: remote:localhost/demo</echo>
<testng outputDir="target/test-output" haltOnFailure="true">
<jvmarg value="-Xmx2G"/>
<jvmarg line="-Djava.rmi.server.hostname=localhost -Dorientdb.config.file=${basedir}/src/test/resources/orientdb-server-config.xml"/>
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<xmlfileset dir="${project.build}/com/orientechnologies/orient/test/database/auto"
includes="remote-test-db-from-scratch.xml"/>
</testng>
<echo>SHUTDOWNING THE SERVER...</echo>
<exec dir="../${orient.path}/bin" executable="cmd" spawn="true" osfamily="windows">
<env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
<arg value="/c shutdown.bat"/>
</exec>
<exec dir="../${orient.path}/bin" executable="sh" spawn="true" osfamily="unix">
<env key="CONFIG_FILE" value="${basedir}/src/test/resources/orientdb-server-config.xml"/>
<arg value="./shutdown.sh"/>
</exec>
</target>
<target name="stress-test">
<echo>MASSIVE INSERT 1,000,000 FLAT RECORDS</echo>
<java classname="com.orientechnologies.orient.test.database.speed.LocalCreateFlatSpeedTest" fork="yes">
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
<jvmarg value="-server"/>
</java>
<echo>MASSIVE INSERT 1,000,000 DOCUMENT RECORDS</echo>
<java classname="com.orientechnologies.orient.test.database.speed.LocalCreateDocumentSpeedTest" fork="yes">
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
<jvmarg value="-server"/>
</java>
<echo>MASSIVE INSERT 20,000 POJOs</echo>
<java classname="com.orientechnologies.orient.test.database.speed.LocalCreateObjectSpeedTest" fork="yes">
<classpath>
<pathelement location="${project.build}"/>
<fileset dir="${global.lib}">
<include name="*.jar"/>
</fileset>
</classpath>
<sysproperty key="url" value="local:../${orient.path}/databases/demo"/>
<jvmarg value="-server"/>
</java>
</target>
<target name="reports" depends="test">
<mkdir dir=""/>
<junitreport todir="target/test-output">
<fileset dir="target/test-output">
<include name="*.xml"/>
</fileset>
<report format="noframes" todir="target/test-output"/>
</junitreport>
</target>
</project>