-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbuild.xml
905 lines (836 loc) · 41.4 KB
/
build.xml
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
<?xml version="1.0" encoding="UTF-8"?>
<project
name="Build file for GNS"
basedir="."
default="jar" >
<!-- Properties -->
<property file="build.properties" />
<property name="src.dir" value="src"/>
<property name="test.dir" value="test" />
<property name="build.dir" value="build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.test.classes.dir" value="${build.dir}/test/classes"/>
<property name="build.test.dir" value="${build.dir}/test"/>
<property name="build.jar.dir" value="jars"/>
<property name="lib.dir" value="lib"/>
<property name="dist.dir"
value="GNS-${build.major.number}.${build.minor.number}.${build.revision.number}"/>
<!--<property name="jars.dir" value="jars"/>-->
<property name="conf.dir" value="conf"/>
<property name="bin.dir" value="bin"/>
<property name="scripts.dir" value="scripts"/>
<property name="db-props-file" location="edu/umass/cs/gnsclient/console/console.properties" />
<path id="classpath.base">
<pathelement location="${build.dir}"/>
<pathelement location="${build.classes.dir}"/>
<pathelement location="${conf.dir}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
<exclude name="android.jar"/>
</fileset>
<!-- put android at the end because it includes a shitty version of json/>-->
<fileset dir="${lib.dir}">
<include name="android.jar"/>
</fileset>
</path>
<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<mkdir dir="${build.test.classes.dir}"/>
<mkdir dir="logs"/>
</target>
<!-- pretty much everything depends on this -->
<target name="compile" depends="init, buildnumber" description="compile java files">
<javac srcdir="${src.dir}:${test.dir}" destdir="${build.classes.dir}" debug="true" debuglevel="lines,vars,source"
includeantruntime="false">
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:rawtypes"/>
<compilerarg value="-Xlint:cast"/>
<compilerarg value="-Xlint:serial"/>
<classpath refid="classpath.base"/>
</javac>
<javac srcdir="${test.dir}" destdir="${build.test.classes.dir}" debug="true" debuglevel="lines,vars,source"
includeantruntime="false">
<compilerarg value="-Xlint:unchecked"/>
<compilerarg value="-Xlint:rawtypes"/>
<compilerarg value="-Xlint:cast"/>
<compilerarg value="-Xlint:serial"/>
<classpath refid="classpath.base"/>
</javac>
<!-- fetch gigapaxos scripts -->
<mkdir dir="${bin.dir}"/>
<get src="https://raw.githubusercontent.com/MobilityFirst/gigapaxos/master/bin/gpServer.sh" dest="bin/"/>
<get src="https://raw.githubusercontent.com/MobilityFirst/gigapaxos/master/bin/gpClient.sh" dest="bin/"/>
<get src="https://raw.githubusercontent.com/MobilityFirst/gigapaxos/master/bin/gpEnv.sh" dest="bin/"/>
<!-- make scripts executable-->
<chmod perm="ug+x" dir="${bin.dir}" includes="**/*.sh"/>
</target>
<target name="compile_eclipse" depends="init, buildnumber" description="compile java files using eclipse java compiler">
<javac compiler="org.eclipse.jdt.core.JDTCompilerAdapter" source="1.8"
target="1.8" srcdir="${src.dir}:${test.dir}" destdir="${build.classes.dir}" debug="true" debuglevel="lines,vars,source" includeantruntime="false">
<classpath refid="classpath.base"/>
<compilerarg value="-warn:+allJavadoc" />
</javac>
<javac srcdir="${test.dir}" destdir="${build.test.classes.dir}" debug="true" debuglevel="lines,vars,source"
includeantruntime="false">
<classpath refid="classpath.base"/>
</javac>
</target>
<target name="server_jarbuild" depends="compile" description="generate jar files">
<mkdir dir="${build.jar.dir}"/>
<jar destfile="${build.jar.dir}/gnsserver-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"
filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="edu.umass.cs.gns.httpserver.GnsHttpServer"/>
<attribute name="Class-Path" value="."/>
<attribute name="Build-Version" value="${version.code}" />
</manifest>
<fileset dir="${build.classes.dir}"
includes="**/*.class"
excludes="edu/umass/cs/gnsclient/**"
/>
<fileset dir="${conf.dir}" includes="trustStore/**, keystore/**" />
<fileset dir="${conf.dir}" includes="**" />
<zipgroupfileset dir="${lib.dir}"
includes="**/*.jar"
excludes="android.jar, hamcrest*.jar, junit*.jar"/>
</jar>
</target>
<fileset id="client.includes" dir="${build.classes.dir}"
includes="**/*.class"/>
<fileset id="test.includes" dir="${build.test.classes.dir}"
includes="**/*.class"/>
<fileset id="console.properties" dir="${src.dir}">
<include name="edu/umass/cs/gnsclient/console/console.properties" />
</fileset>
<fileset id="client.keystore" dir="${conf.dir}" includes="trustStore/**, keystore/**" />
<!-- gigapaxos below could probably be nio, but nio has half of gigpaxos anyway so just use it
- see the comment in the build.xml in gigapaxos
also commons-cli and derby are already in gigapaxos
-->
<zipfileset id="client.lib" dir="${lib.dir}"
includes="jline*.jar, commons-lang*.jar, gigapaxos*.jar"
/>
<target name="client_jarbuild" depends="compile" description="generate jar files">
<mkdir dir="${build.jar.dir}"/>
<jar
jarfile="${build.jar.dir}/gnsclient-${build.major.number}.${build.minor.number}.${build.revision.number}.jar">
<manifest>
<attribute name="Built-By" value="Westy"/>
<attribute name="Implementation-Vendor"
value="University of Massachusetts" />
<attribute name="Implementation-Title" value="GNS" />
<attribute name="Implementation-Version"
value="${build.major.number}.${build.minor.number}.${build.revision.number}" />
<attribute name="Class-Path" value="."/>
<!-- <attribute name="Class-Path" value="${jar.classpath}"/>-->
<attribute name="Build-Version" value="${version.code}" />
</manifest>
<fileset refid="client.includes"/>
<fileset refid="test.includes"/>
<fileset refid="client.keystore" />
<zipgroupfileset refid="client.lib" />
</jar>
</target>
<target name="client_console_jarbuild" depends="compile">
<mkdir dir="${build.jar.dir}"/>
<jar
jarfile="${build.jar.dir}/gns-cli-${build.major.number}.${build.minor.number}.${build.revision.number}.jar">
<manifest>
<attribute name="Built-By" value="Westy" />
<!-- Information about the program itself -->
<attribute name="Implementation-Vendor"
value="University of Massachusetts" />
<attribute name="Implementation-Title" value="GNS CLI" />
<attribute name="Implementation-Version"
value="${build.major.number}.${build.minor.number}.${build.revision.number}" />
<attribute name="Main-Class" value="edu.umass.cs.gnsclient.console.CommandLineInterface" />
<attribute name="Build-Version" value="${version.code}" />
</manifest>
<fileset refid="client.includes"/>
<fileset refid="client.keystore" />
<fileset refid="console.properties" />
<zipgroupfileset refid="client.lib" />
</jar>
</target>
<target name="clean" description="remove generated files">
<delete dir="${build.dir}"/>
<delete dir="${build.jar.dir}"/>
<delete dir="${dist.dir}"/>
</target>
<target name="doc" description="generate javadoc">
<mkdir dir="${build.dir}/doc"/>
<javadoc packagenames="edu.umass.cs.*"
sourcepath="${src.dir}"
destdir="${build.dir}/doc"
additionalparam="-Xdoclint:none"
author="true"
version="true"
use="true"
public="true"
windowtitle="GNS API (specification
${build.major.number}.${build.minor.number}.${build.revision.number})">
<doctitle>
<![CDATA[<h1>GNS API (specification
${build.major.number}.${build.minor.number}.${build.revision.number})</h1>]]>
</doctitle>
<bottom>
<![CDATA[<i>Copyright © 2014-2016 University of Massachusetts - All Rights Reserved.</i>]]>
</bottom>
<classpath refid="classpath.base"/>
</javadoc>
<mkdir dir="${dist.dir}/doc"/>
<copy todir="${dist.dir}/doc">
<fileset dir="${build.dir}/doc" includes="**"/>
</copy>
</target>
<target name="jar" depends="server_jarbuild, client_jarbuild, client_console_jarbuild">
<symlink link="${build.jar.dir}/GNS.jar" overwrite="yes"
resource="gnsserver-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"/>
<symlink link="${build.jar.dir}/GNSClient.jar" overwrite="yes"
resource="gnsclient-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"/>
<symlink link="${build.jar.dir}/GNS-CLI.jar" overwrite="yes"
resource="gns-cli-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"/>
</target>
<target name="dist" depends="clean, jar">
<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.dir}/${build.jar.dir}"/>
<mkdir dir="${dist.dir}/${bin.dir}"/>
<copy todir="${dist.dir}/${build.jar.dir}">
<fileset dir="${build.jar.dir}" includes="*.jar"/>
</copy>
<copy todir="${dist.dir}/${bin.dir}">
<fileset dir="${bin.dir}" includes="*"/>
</copy>
<!-- make bin scripts executable-->
<chmod perm="ug+x" dir="${dist.dir}/${bin.dir}" includes="**/*.sh"/>
<copy todir="${dist.dir}">
<fileset dir="." includes="LICENSE.txt README.md"/>
</copy>
<copy todir="${dist.dir}/${conf.dir}">
<fileset dir="conf"/>
</copy>
<symlink link="${dist.dir}/jars/GNSClient.jar" overwrite="yes"
resource="gnsclient-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"/>
<symlink link="${dist.dir}/jars/GNSClient.jar" overwrite="yes"
resource="gnsclient-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"/>
<symlink link="${dist.dir}/jars/GNS-CLI.jar" overwrite="yes"
resource="gns-cli-${build.major.number}.${build.minor.number}.${build.revision.number}.jar"/>
</target>
<path id="classpath.test">
<pathelement location="${build.classes.dir}"/>
<pathelement location="${lib.dir}/gigapaxos-1.0.06.jar"/>
<pathelement location="${lib.dir}/junit-4.12.jar"/>
<pathelement location="${lib.dir}/hamcrest-all-1.3.jar"/>
<pathelement location="${lib.dir}/jline-1.0.jar"/>
<pathelement location="${lib.dir}/commons-lang3-3.3.1.jar"/>
<pathelement location="${lib.dir}/commons-cli-1.1.jar"/>
<pathelement location="${lib.dir}/derby.jar"/>
<pathelement location="${lib.dir}/log4j-1.2.16.jar"/>
<pathelement location="${lib.dir}/context-client-GNS.jar"/>
<pathelement location="${lib.dir}/mongo-java-driver-2.12.1.jar"/>
<pathelement location="${lib.dir}/android.jar"/>
<pathelement location="${conf.dir}"/>
<pathelement location="${db-props-file}" />
</path>
<target name="ensure-test-name" unless="test">
<fail message="You must run this target with -Dtest=TestName"/>
</target>
<target name="startServer" depends="compile" description="Forceclears and (re)starts a server for testing purposes.">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.properties"/>
<property name="javax.net.ssl.trustStorePassword" value="qwerty"/>
<property name="javax.net.ssl.trustStore" value="conf/trustStore/node100.jks"/>
<property name="javax.net.ssl.keyStorePassword" value="qwerty"/>
<property name="javax.net.ssl.keyStore" value="conf/keyStore/node100.jks"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.startServer.properties"/>
<exec executable="/bin/bash">
<arg line="bin/gpServer.sh -DgigapaxosConfig=${gigapaxosConfig} forceclear all"/>
</exec>
<exec executable="/bin/bash">
<arg line="bin/gpServer.sh -Djavax.net.ssl.trustStorePassword=${javax.net.ssl.trustStorePassword} -Djavax.net.ssl.trustStore=${javax.net.ssl.trustStore} -Djavax.net.ssl.keyStorePassword=${javax.net.ssl.keyStorePassword} -Djavax.net.ssl.keyStore=${javax.net.ssl.keyStore} -Djava.util.logging.config.file=${java.util.logging.config.file} -DgigapaxosConfig=${gigapaxosConfig} restart all"/>
</exec>
<sleep seconds="10"/>
</target>
<target name="endServer" depends="compile" description="Ends the servers used for testing purposes.">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.properties"/>
<exec executable="/bin/bash">
<arg line="bin/gpServer.sh -DgigapaxosConfig=${gigapaxosConfig} stop all"/>
</exec>
<exec executable="/bin/bash">
<arg line="bin/gpServer.sh -DgigapaxosConfig=${gigapaxosConfig} foreclear all"/>
</exec>
</target>
<target name="compiletest" depends="compile" description="Compile all the test files">
<mkdir dir="${build.test.dir}" />
<mkdir dir="${build.test.classes.dir}" />
<javac srcdir="${test.dir}"
destdir="${build.test.classes.dir}"
debug="on"
includeantruntime="false">
<classpath refid="classpath.test"/>
</javac>
</target>
<target name="test" description="Runs all the singles tests against a 3 node server."
depends="compile, compiletest, runSingleTests">
</target>
<target name="runSingleTests" description="Runs all of the singletests">
<antcall target="runtest">
<param name="test" value="singletests"/>
</antcall>
</target>
<target name="pkgtest" description="Starts servers specified in properties file"
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.unittest.properties"/>
<property name="singleJVM" value="false"/>
<property name="waitTillAllServersReady" value="000"/>
<property name="startServer" value="true"/>
<property name="singleJVM" value="false"/>
<property name="forceclear" value="false"/>
<junit printsummary="yes" fork="true" forkmode="once" haltonfailure="on" showoutput="yes">
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<jvmarg value="-DstartServer=true"/>
<jvmarg value="-DstopServer=false"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-DsingleJVM=${singleJVM}"/>
<jvmarg value="-Dforceclear=${forceclear}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<batchtest>
<fileset dir="${test.dir}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
<batchtest>
<fileset dir="${build.test.classes.dir}">
<include name="**/${test}/*Test.class"/>
</fileset>
</batchtest>
<batchtest>
<fileset dir="${build.classes.dir}">
<include name="**/*ZDefaultGNSTest.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="runtest" description="Runs the test you specify on the command line with -Dtest="
depends="compiletest, ensure-test-name, pkgtest">
</target>
<target name="pkgtestNoKeyStore" description="Starts servers specified in properties file. unit tests run without the keystore"
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.unittest.properties"/>
<property name="singleJVM" value="false"/>
<property name="waitTillAllServersReady" value="000"/>
<property name="startServer" value="true"/>
<property name="singleJVM" value="false"/>
<property name="forceclear" value="false"/>
<junit printsummary="yes" fork="true" forkmode="once" haltonfailure="on" showoutput="yes">
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=true"/>
<jvmarg value="-DstopServer=false"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-DsingleJVM=${singleJVM}"/>
<jvmarg value="-Dforceclear=${forceclear}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<batchtest>
<fileset dir="${test.dir}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
<batchtest>
<fileset dir="${build.test.classes.dir}">
<include name="**/${test}/*Test.class"/>
</fileset>
</batchtest>
<batchtest>
<fileset dir="${build.classes.dir}">
<include name="**/*ZDefaultGNSTest.class"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="runtestNoKeyStore" description="Runs the test you specify on the command line with -Dtest="
depends="compiletest, ensure-test-name, pkgtestNoKeyStore">
</target>
<target name="testNoServer"
description="Runs with the correct keystore the test you specify on the command line -Dtest Does not start a server="
depends="compiletest, ensure-test-name">
<!-- Allows us to pass in some standard args from command line using things like -Dalias=fred/>-->
<property name="alias" value=""/>
<property name="password" value=""/>
<property name="count" value=""/>
<property name="gigapaxosConfig" value="conf/gnsclient.3local.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.junit.properties"/>
<junit printsummary="withOutAndErr" fork="yes" showoutput="yes">
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-Dalias=${alias}"/>
<jvmarg value="-Dpassword=${password}"/>
<jvmarg value="-Dcount=${count}"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<!-- add this if you want SSL debugging enabled -->
<!-- <jvmarg value="-Djavax.net.debug=ssl"/>-->
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${test.dir}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="testNoServerWithKeyStore"
description="Runs with the correct keystore the test you specify on the command line -Dtest= Does not start a server"
depends="compiletest, ensure-test-name">
<!-- Allows us to pass in some standard args from command line using things like -Dalias=fred/>-->
<property name="alias" value=""/>
<property name="password" value=""/>
<property name="count" value=""/>
<property name="gigapaxosConfig" value="conf/gnsclient.3local.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.junit.properties"/>
<junit printsummary="withOutAndErr" fork="yes" showoutput="yes">
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-Dalias=${alias}"/>
<jvmarg value="-Dpassword=${password}"/>
<jvmarg value="-Dcount=${count}"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<!-- add this if you want SSL debugging enabled -->
<!-- <jvmarg value="-Djavax.net.debug=ssl"/>-->
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${test.dir}">
<include name="**/${test}.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="mutualAuthTest" description="Runs the mutualAuthTest with the correct keystore."
depends="compiletest">
<!-- Allows us to pass in some standard args from command line using things like -Dalias=fred/>-->
<property name="alias" value=""/>
<property name="password" value=""/>
<property name="count" value=""/>
<property name="gigapaxosConfig" value="conf/gnsclient.3local.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.junit.properties"/>
<junit printsummary="withOutAndErr" fork="yes" showoutput="yes">
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-Djavax.net.ssl.keyStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.keyStore=conf/keyStore/node100.jks"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-Dalias=${alias}"/>
<jvmarg value="-Dpassword=${password}"/>
<jvmarg value="-Dcount=${count}"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<!-- add this if you want SSL debugging enabled -->
<!-- <jvmarg value="-Djavax.net.debug=ssl"/>-->
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="${test.dir}">
<include name="**/AdminTestSuite.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="batchTest" depends="compiletest">
<!-- Allows us to pass this in from the command line using -DgigapaxosConfig=filename/> -->
<property name="gigapaxosConfig" value="conf/gnsclient.3local.properties"/>
<junit>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-Dalias=${alias}"/>
<jvmarg value="-Dpassword=${password}"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-Dcount=${count}"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=conf/logging.gns.junit.properties"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
<batchtest>
<fileset dir="${test.dir}">
<include name="**/*Test*.java"/>
<exclude name="edu/umass/cs/gnsclient/client/integrationtests/**" />
</fileset>
</batchtest>
<formatter type="plain" usefile="false"/>
<!--<formatter type="brief" usefile="false"/> -->
</junit>
</target>
<target name="connectTest" description="Performs a few tests after starting the server. This is being used to find out what waitTillAllServersReady value is needed for Date to have a 99% success rate."
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.unittest.properties"/>
<property name="waitTillAllServersReady" value="5000"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerConnectTest"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=true"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="runIntegrationTest" description="Runs the default integration test a 3 node server."
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.unittest.properties"/>
<property name="waitTillAllServersReady" value="000"/>
<property name="startServer" value="true"/>
<property name="singleJVM" value="true"/>
<property name="forceclear" value="true"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=${startServer}"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-DsingleJVM=${singleJVM}"/>
<jvmarg value="-Dforceclear=${forceclear}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testMethod" description="Runs the default integration test against a 3 node server."
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.unittest.properties"/>
<property name="waitTillAllServersReady" value="5000"/>
<property name="reps" value="1"/>
<property name="test" value="test_010_CreateEntity"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test
name="edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest"
methods="${test}"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-Dtest=${test}"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=true"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-Dreps=${reps}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="test1" description="Runs the default integration test against a single node server."
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.1local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.unittest.properties"/>
<property name="waitTillAllServersReady" value="5000"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=true"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="LNSProxyTest" description="Runs the LNSProxyTest from ServerIntegrationTests."
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<property name="java.util.logging.config.file" value="conf/logging.gns.properties"/>
<property name="waitTillAllServersReady" value="5000"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.singletests.LNSProxyTest"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=true"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=${gigapaxosConfig}"/>
<jvmarg value="-Djava.util.logging.config.file=${java.util.logging.config.file}"/>
<jvmarg value="-DwaitTillAllServersReady=${waitTillAllServersReady}"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testAll" description="Runs the default integration test against a 3 node server (by default), the parallel test, and all the single tests."
depends="compile, compiletest">
<property name="gigapaxosConfig" value="conf/gnsserver.3local.unittest.properties"/>
<antcall target="startServer"/>
<antcall target="integrationTest">
<param name="integrationTest.startServer" value="false"/>
</antcall>
<antcall target="startServer"/>
<antcall target="testThreaded">
<param name="integrationTest.startServer" value="false"/>
</antcall>
<antcall target="runSingleTests"/>
<antcall target="endServer"/>
</target>
<target name="integrationTest" description="Runs the default integration test against a 3 node server"
depends="compile, compiletest">
<property name="integrationTest.startServer" value="true"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTest"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=${integrationTest.startServer}"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=conf/gnsserver.3local.unittest.properties"/>
<jvmarg value="-Djava.util.logging.config.file=conf/logging.gns.properties"/>
<jvmarg value="-Dserver.command=bin/gpServer.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testAlwaysFail" description="This test always fails. Use for debugging what happens when tests fail."
depends="jar, compiletest">
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.AlwaysFail"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg
value="-Djava.util.logging.config.file=conf/logging.gns.unittest.properties"/>
<jvmarg value="-DinheritIO=true"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="bugSequential" description="Runs the test that is intended to reveal a timeout bug in the ServerIntegrationTest suite."
depends="jar, compiletest">
<property name="integrationTestRuns" value="500"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.bugreports.SequentialCreateFieldTimeout"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=false"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DintegrationTest.runs=${integrationTestRuns}"/>
<jvmarg value="-DgigapaxosConfig=conf/gnsserver.1local.properties"/>
<jvmarg value="-Djava.util.logging.config.file=conf/logging.gns.unittest.properties"/>
<jvmarg value="-Dserver.command=scripts/singlenodetests/reset_and_restart.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testFailures" description="Runs the default integration test against a 3 node server"
depends="compile, compiletest">
<property name="failureTestThreads" value="50"/>
<property name="failureTestRoundTime" value="10"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerFailureTests"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DfailureTest.threads=${failureTestThreads}"/>
<jvmarg value="-DfailureTest.roundTime=${failureTestRoundTime}"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DgigapaxosConfig=conf/gnsserver.3local.unittest.properties"/>
<jvmarg value="-Djava.util.logging.config.file=conf/logging.gns.unittest.properties"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testSequential" description="Runs the default
integration tests sequentially"
depends="jar, compiletest">
<property name="integrationTestRuns" value="30"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTestSequential"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=false"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DintegrationTest.runs=${integrationTestRuns}"/>
<jvmarg value="-DgigapaxosConfig=conf/gnsserver.1local.properties"/>
<jvmarg value="-Djava.util.logging.config.file=conf/logging.gns.unittest.properties"/>
<jvmarg value="-Dserver.command=scripts/singlenodetests/reset_and_restart.sh"/>
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="testThreaded" description="Runs the default integration tests in parallel"
depends="compile, compiletest">
<property name="integrationTest.startServer" value="true"/>
<property name="integrationTestRuns" value="5"/>
<property name="integrationTestThreads" value="3"/>
<junit printsummary="yes" fork="yes" haltonfailure="on" showoutput="yes">
<test name="edu.umass.cs.gnsclient.client.integrationtests.ServerIntegrationTestThreaded"/>
<formatter type="plain" usefile="false"/>
<jvmarg value="-ea"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=qwerty"/>
<jvmarg value="-Djavax.net.ssl.trustStore=conf/trustStore/node100.jks"/>
<jvmarg value="-DstartServer=${integrationTest.startServer}"/>
<jvmarg value="-DinheritIO=true"/>
<jvmarg value="-DintegrationTest.runs=${integrationTestRuns}"/>
<jvmarg value="-DintegrationTest.threads=${integrationTestThreads}"/>
<jvmarg value="-DgigapaxosConfig=conf/gnsserver.3local.properties"/>
<jvmarg value="-Djava.util.logging.config.file=conf/logging.gns.unittest.properties"/>
<!--<jvmarg value="-Dserver.command=scripts/3nodeslocal/reset_and_restart.sh"/>-->
<classpath>
<pathelement location="${build.test.classes.dir}"/>
</classpath>
<!-- Make sure these libraries are included -->
<classpath refid="classpath.test" />
</junit>
</target>
<target name="all" depends="clean,jar"
description="build all files"/>
<target name="buildnumber" description="Generates version number and sets it in properties file.">
<buildnumber file="build.number" />
<!--<property name="version.code" value="${VERSION}_${RELEASE}_build${build.number}" />-->
<property name="version.code" value="${build.major.number}.${build.minor.number}.${build.revision.number}_build${build.number}" />
<echo>Version: ${version.code}</echo>
</target>
<!-- Stuff below for updating versions -->
<property file="build.properties"/>
<property name="build.mmr.number"
value="${build.major.number}.${build.minor.number}.${build.revision.number}"/>
<target name="current-number">
<echo>Current build number:${build.mmr.number}</echo>
</target>
<target name="revision">
<propertyfile file="build.properties">
<entry key="build.revision.number" type="int"
operation="+" value="1" pattern="00"/>
</propertyfile>
</target>
<target name="minor">
<propertyfile file="build.properties">
<entry key="build.minor.number" type="int" operation="+"
value="1" pattern="00"/>
<entry key="build.revision.number" type="int" value="0"
pattern="00"/>
</propertyfile>
</target>
<target name="major">
<propertyfile file="build.properties">
<entry key="build.major.number" type="int" operation="+"
value="1" pattern="00"/>
<entry key="build.minor.number" type="int" value="0"
pattern="00"/>
<entry key="build.revision.number" type="int" value="0"
pattern="00"/>
</propertyfile>
</target>
<target name="wiki" description="Generates the wiki constants file and wiki samples file"
depends="compile">
<java classname="edu.umass.cs.wiki.WikiConstantsGenerator">
<classpath refid="classpath.base"/>
</java>
<exec executable="python" failonerror="true">
<arg line="wiki/init_website.py" />
</exec>
</target>
</project>