Merge lp:~nwilliams/akiban-persistit/fix-stress-test-and-findbugs-helpers into lp:akiban-persistit

Proposed by Nathan Williams
Status: Merged
Approved by: Peter Beaman
Approved revision: 315
Merged at revision: 313
Proposed branch: lp:~nwilliams/akiban-persistit/fix-stress-test-and-findbugs-helpers
Merge into: lp:akiban-persistit
Diff against target: 290 lines (+105/-33)
8 files modified
examples/FindFile/build.xml (+15/-4)
examples/HelloWorld/build.xml (+14/-4)
examples/PersistitMapDemo/build.xml (+14/-4)
examples/SimpleBench/build.xml (+16/-5)
examples/SimpleDemo/build.xml (+16/-5)
examples/SimpleTransaction/build.xml (+18/-7)
pom.xml (+1/-1)
src/etc/run_stress_tests.py (+11/-3)
To merge this branch: bzr merge lp:~nwilliams/akiban-persistit/fix-stress-test-and-findbugs-helpers
Reviewer Review Type Date Requested Status
Peter Beaman Approve
Review via email: mp+107972@code.launchpad.net

Description of the change

Update references for files that were moved, add debug options to test runner.

To post a comment you must log in.
314. By Nathan Williams

Fix description on new option

315. By Nathan Williams

Update example build files for planned jar locations.

Revision history for this message
Nathan Williams (nwilliams) wrote :

Also tweak example build files so they work with (planned) release locations or built from source.

Revision history for this message
Peter Beaman (pbeaman) wrote :

Very nice.

review: Approve
316. By Nathan Williams

Fix location typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/FindFile/build.xml'
2--- examples/FindFile/build.xml 2012-05-29 19:49:46 +0000
3+++ examples/FindFile/build.xml 2012-05-31 01:57:18 +0000
4@@ -31,17 +31,28 @@
5 srcdir="."
6 destdir=".">
7 <classpath>
8- <fileset dir="../../target">
9- <include name="akiban-persistit*.jar"/>
10+ <fileset dir="../..">
11+ <or>
12+ <!-- Release location -->
13+ <filename name="akiban-persistit-*.jar" />
14+ <!-- Source location -->
15+ <filename name="target/akiban-persistit-*.jar" />
16+ </or>
17 </fileset>
18+ <pathelement location="." />
19 </classpath>
20 </javac>
21 </target>
22 <target name="run" depends="compile">
23 <java fork="true" classname="FindFile">
24 <classpath>
25- <fileset dir="../../target">
26- <include name="akiban-persistit*.jar"/>
27+ <fileset dir="../..">
28+ <or>
29+ <!-- Release location -->
30+ <filename name="akiban-persistit-*.jar" />
31+ <!-- Source location -->
32+ <filename name="target/akiban-persistit-*.jar" />
33+ </or>
34 </fileset>
35 <pathelement location="." />
36 </classpath>
37
38=== modified file 'examples/HelloWorld/build.xml'
39--- examples/HelloWorld/build.xml 2012-05-29 19:49:46 +0000
40+++ examples/HelloWorld/build.xml 2012-05-31 01:57:18 +0000
41@@ -29,8 +29,13 @@
42 srcdir="."
43 destdir=".">
44 <classpath>
45- <fileset dir="../../target">
46- <include name="akiban-persistit*.jar"/>
47+ <fileset dir="../..">
48+ <or>
49+ <!-- Release location -->
50+ <filename name="akiban-persistit-*.jar" />
51+ <!-- Source location -->
52+ <filename name="target/akiban-persistit-*.jar" />
53+ </or>
54 </fileset>
55 <pathelement location="." />
56 </classpath>
57@@ -40,8 +45,13 @@
58 <target name="run" depends="compile">
59 <java classname="HelloWorld" fork="true">
60 <classpath>
61- <fileset dir="../../target">
62- <include name="akiban-persistit*.jar"/>
63+ <fileset dir="../..">
64+ <or>
65+ <!-- Release location -->
66+ <filename name="akiban-persistit-*.jar" />
67+ <!-- Source location -->
68+ <filename name="target/akiban-persistit-*.jar" />
69+ </or>
70 </fileset>
71 <pathelement location="." />
72 </classpath>
73
74=== modified file 'examples/PersistitMapDemo/build.xml'
75--- examples/PersistitMapDemo/build.xml 2012-05-29 19:49:46 +0000
76+++ examples/PersistitMapDemo/build.xml 2012-05-31 01:57:18 +0000
77@@ -29,8 +29,13 @@
78 srcdir="."
79 destdir=".">
80 <classpath>
81- <fileset dir="../../target">
82- <include name="akiban-persistit*.jar"/>
83+ <fileset dir="../..">
84+ <or>
85+ <!-- Release location -->
86+ <filename name="akiban-persistit-*.jar" />
87+ <!-- Source location -->
88+ <filename name="target/akiban-persistit-*.jar" />
89+ </or>
90 </fileset>
91 <pathelement location="." />
92 </classpath>
93@@ -40,8 +45,13 @@
94 <target name="run" depends="compile">
95 <java classname="PersistitMapDemo" fork="true" >
96 <classpath>
97- <fileset dir="../../target">
98- <include name="akiban-persistit*.jar"/>
99+ <fileset dir="../..">
100+ <or>
101+ <!-- Release location -->
102+ <filename name="akiban-persistit-*.jar" />
103+ <!-- Source location -->
104+ <filename name="target/akiban-persistit-*.jar" />
105+ </or>
106 </fileset>
107 <pathelement location="." />
108 </classpath>
109
110=== modified file 'examples/SimpleBench/build.xml'
111--- examples/SimpleBench/build.xml 2012-05-29 19:49:46 +0000
112+++ examples/SimpleBench/build.xml 2012-05-31 01:57:18 +0000
113@@ -29,9 +29,15 @@
114 srcdir="."
115 destdir=".">
116 <classpath>
117- <fileset dir="../../target">
118- <include name="akiban-persistit*.jar"/>
119+ <fileset dir="../..">
120+ <or>
121+ <!-- Release location -->
122+ <filename name="akiban-persistit-*.jar" />
123+ <!-- Source location -->
124+ <filename name="target/akiban-persistit-*.jar" />
125+ </or>
126 </fileset>
127+ <pathelement location="." />
128 </classpath>
129 </javac>
130
131@@ -40,9 +46,14 @@
132 <target name="run" depends="compile">
133 <java classname="SimpleBench" fork="true">
134 <classpath>
135- <fileset dir="../../target">
136- <include name="akiban-persistit*.jar"/>
137- </fileset>
138+ <fileset dir="../..">
139+ <or>
140+ <!-- Release location -->
141+ <filename name="akiban-persistit-*.jar" />
142+ <!-- Source location -->
143+ <filename name="target/akiban-persistit-*.jar" />
144+ </or>
145+ </fileset>
146 <pathelement location="." />
147 </classpath>
148 </java>
149
150=== modified file 'examples/SimpleDemo/build.xml'
151--- examples/SimpleDemo/build.xml 2012-05-29 19:49:46 +0000
152+++ examples/SimpleDemo/build.xml 2012-05-31 01:57:18 +0000
153@@ -29,9 +29,15 @@
154 srcdir="."
155 destdir=".">
156 <classpath>
157- <fileset dir="../../target">
158- <include name="akiban-persistit*.jar"/>
159+ <fileset dir="../..">
160+ <or>
161+ <!-- Release location -->
162+ <filename name="akiban-persistit-*.jar" />
163+ <!-- Source location -->
164+ <filename name="target/akiban-persistit-*.jar" />
165+ </or>
166 </fileset>
167+ <pathelement location="." />
168 </classpath>
169 </javac>
170 </target>
171@@ -39,9 +45,14 @@
172 <target name="run" depends="compile">
173 <java classname="SimpleDemo" fork="true">
174 <classpath>
175- <fileset dir="../../target">
176- <include name="akiban-persistit*.jar"/>
177- </fileset>
178+ <fileset dir="../..">
179+ <or>
180+ <!-- Release location -->
181+ <filename name="akiban-persistit-*.jar" />
182+ <!-- Source location -->
183+ <filename name="target/akiban-persistit-*.jar" />
184+ </or>
185+ </fileset>
186 <pathelement location="." />
187 </classpath>
188 </java>
189
190=== modified file 'examples/SimpleTransaction/build.xml'
191--- examples/SimpleTransaction/build.xml 2012-05-29 19:49:46 +0000
192+++ examples/SimpleTransaction/build.xml 2012-05-31 01:57:18 +0000
193@@ -29,9 +29,15 @@
194 srcdir="."
195 destdir=".">
196 <classpath>
197- <fileset dir="../../target">
198- <include name="akiban-persistit-*.jar"/>
199+ <fileset dir="../..">
200+ <or>
201+ <!-- Release location -->
202+ <filename name="akiban-persistit-*.jar" />
203+ <!-- Source location -->
204+ <filename name="target/akiban-persistit-*.jar" />
205+ </or>
206 </fileset>
207+ <pathelement location="." />
208 </classpath>
209 </javac>
210 </target>
211@@ -39,11 +45,16 @@
212 <target name="run" depends="compile">
213 <java classname="SimpleTransaction" fork="true">
214 <classpath>
215- <fileset dir="../../target">
216- <include name="akiban-persistit*.jar"/>
217- </fileset>
218- <pathelement location="." />
219- </classpath>
220+ <fileset dir="../..">
221+ <or>
222+ <!-- Release location -->
223+ <filename name="akiban-persistit-*.jar" />
224+ <!-- Source location -->
225+ <filename name="target/akiban-persistit-*.jar" />
226+ </or>
227+ </fileset>
228+ <pathelement location="." />
229+ </classpath>
230 </java>
231 </target>
232
233
234=== modified file 'pom.xml'
235--- pom.xml 2012-05-29 19:04:12 +0000
236+++ pom.xml 2012-05-31 01:57:18 +0000
237@@ -175,7 +175,7 @@
238 <findbugsXmlOutput>true</findbugsXmlOutput>
239 <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
240 <xmlOutput>true</xmlOutput>
241- <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
242+ <excludeFilterFile>src/etc/findbugs-exclude.xml</excludeFilterFile>
243 </configuration>
244 </plugin>
245 <plugin>
246
247=== modified file 'src/etc/run_stress_tests.py'
248--- src/etc/run_stress_tests.py 2012-05-29 19:04:12 +0000
249+++ src/etc/run_stress_tests.py 2012-05-31 01:57:18 +0000
250@@ -1,3 +1,5 @@
251+#!/usr/bin/env python
252+# coding: utf-8
253 #
254 # Copyright © 2011-2012 Akiban Technologies, Inc. All rights reserved.
255 #
256@@ -36,6 +38,12 @@
257 )
258
259 parser.add_option(
260+ "--jvm-opts",
261+ default = "-ea -Dcom.sun.management.jmxremote.port=8082 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xrunjdwp:transport=dt_socket,address=8000,suspend=n,server=y",
262+ help = "Extra options to pass to the JVM (e.g. JMX, debug). [default: %default]"
263+)
264+
265+parser.add_option(
266 "--test-dir",
267 default = "./src/test/resources/tscripts",
268 help = "Directory where test scripts are located. [default: %default]"
269@@ -93,10 +101,10 @@
270 cmd = "grep version pom.xml | grep SNAPSHOT"
271 (retcode, output) = commands.getstatusoutput(cmd)
272 version = output.lstrip()[9:output.lstrip().find('SNAPSHOT')-1]
273- jar_file = "target/akiban-persistit-core-%s-SNAPSHOT-jar-with-dependencies-and-tests.jar" % version
274+ jar_file = "target/akiban-persistit-%s-SNAPSHOT-jar-with-dependencies-and-tests.jar" % version
275
276 if not os.path.isfile(jar_file):
277- print "PersistIT JAR file does not exist! Did you run mvn install?"
278+ print "Persistit JAR file does not exist! Did you run mvn install?"
279 sys.exit(1)
280
281 test_failures = 0
282@@ -107,7 +115,7 @@
283 full_test_path = options.test_dir + "/" + test
284 test_data_path = options.test_run_dir + "/" + test
285 os.makedirs(test_data_path)
286- run_cmd = "java -Xmx%s -cp %s com.persistit.test.TestRunner script=%s datapath=%s logpath=%s" % (options.xmx, jar_file, full_test_path, test_data_path, test_data_path)
287+ run_cmd = "java %s -Xmx%s -cp %s com.persistit.test.TestRunner script=%s datapath=%s logpath=%s" % (options.jvm_opts, options.xmx, jar_file, full_test_path, test_data_path, test_data_path)
288 print "%s\t\t\t" % test,
289 (retcode, output) = commands.getstatusoutput(run_cmd)
290 if retcode:

Subscribers

People subscribed via source and target branches