-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathtest.xml
More file actions
730 lines (670 loc) · 49 KB
/
test.xml
File metadata and controls
730 lines (670 loc) · 49 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
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
<?xml version="1.0"?>
<project name="ejbcatest" basedir=".">
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="lib/coverage/jacocoant.jar"/>
</taskdef>
<target name="test:run" description="run both stand-alone JUnit test cases and system test" depends="deleteDirectories">
<antcall target="test:runsa" inheritall="true" inheritrefs="true"><param name="aggregate.results" value="true"/></antcall>
<antcall target="test:runsys" inheritall="true" inheritrefs="true"><param name="aggregate.results" value="true"/></antcall>
<antcall target="createreport"/>
</target>
<target name="test:runsys" description="run system test, use -Dtest.includep11=true to include P11 tests" depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/systemtests" target="run" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-ws" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-configdump-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-statedump-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-peerconnector-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-plugins-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-plugins-ee-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-acme-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-rest-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-caa-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-mpic-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-ssh-system" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-cits-system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
<!-- The name of the output from the profiling result will vary slightly -->
<fileset id="profilingtest.logfile.id" dir="${reports.base.dir}/test/html/org/ejbca/core/ejb" includes="*_ProfilingTest-out.html"/>
<property name="profilingtest.logfile" refid="profilingtest.logfile.id"/>
<echo message="Profiling results (when enabled) can be found in file://${reports.dir}/html/org/ejbca/core/ejb/${profilingtest.logfile}"/>
</target>
<target name="evaluateAggregate">
<condition property="aggregate.test.results" value="true">
<equals arg1="${aggregate.results}" arg2="true"/>
</condition>
</target>
<target name="deleteDirectories" depends="evaluateAggregate" unless="${aggregate.test.results}" >
<echo message="Deleting old test results."/>
<fail message="'reports.dir' is not set." unless="reports.dir" />
<delete dir="${reports.dir}" />
<mkdir dir="${reports.dir}" />
<mkdir dir="${reports.dir}/html"/>
</target>
<target name="test:runsa" description="run stand-alone JUnit test cases, use -Dtest.includep11=true to include P11 tests" depends="deleteDirectories">
<antcall target="optional-test-acme-unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/cesecore-common" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/cesecore-ejb" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/cesecore-ejb-interface" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/cesecore-entity" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/cesecore-x509ca" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-common" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-common-web" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-ejb" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-entity" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-ws-cli" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/healthcheck-war" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/plugins" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/admin-gui" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ra-gui" target="test:unit" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/ejbca-ejb-cli" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-msae-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-rest-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-configdump-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-ct" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-caa-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-mpic-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-ssh-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-cits-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-peerconnector-unit" inheritall="true" inheritrefs="true"/>
<antcall target="optional-test-plugins-ee-unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<condition property="configdump.exists"><available file="modules/configdump/build.xml" /></condition>
<target name="optional-test-configdump-system" if="${configdump.exists}">
<ant antfile="build.xml" dir="modules/configdump" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="configdump.exists"><available file="modules/configdump/build.xml" /></condition>
<target name="optional-test-configdump-unit" if="${configdump.exists}">
<ant antfile="build.xml" dir="modules/configdump" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<condition property="ct.exists"><available file="modules/ct/build.xml" /></condition>
<target name="optional-test-ct" if="${ct.exists}">
<ant antfile="build.xml" dir="modules/ct" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<condition property="statedump.exists"><available file="modules/statedump/build.xml" /></condition>
<target name="optional-test-statedump-system" if="${statedump.exists}">
<ant antfile="build.xml" dir="modules/statedump" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="peerconnector.exists"><available file="modules/peerconnector/build.xml" /></condition>
<target name="optional-test-peerconnector-unit" if="${peerconnector.exists}">
<ant antfile="build.xml" dir="modules/peerconnector" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<condition property="peerconnector.exists"><available file="modules/peerconnector/build.xml" /></condition>
<target name="optional-test-peerconnector-system" if="${peerconnector.exists}">
<ant antfile="build.xml" dir="modules/peerconnector" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="plugins.exist"><available file="modules/plugins/build.xml" /></condition>
<target name="optional-test-plugins-system" if="${plugins.exist}">
<ant antfile="build.xml" dir="modules/plugins" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="plugins-ee.exist"><available file="modules/plugins-ee/build.xml" /></condition>
<target name="optional-test-plugins-ee-unit" if="${plugins-ee.exist}">
<ant antfile="build.xml" dir="modules/plugins-ee" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<condition property="plugins-ee.exist"><available file="modules/plugins-ee/build.xml" /></condition>
<target name="optional-test-plugins-ee-system" if="${plugins-ee.exist}">
<ant antfile="build.xml" dir="modules/plugins-ee" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="acme.exists"><available file="modules/acme"/></condition>
<target name="optional-test-acme-unit" if="${acme.exists}">
<ant antfile="build.xml" dir="modules/acme" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<target name="optional-test-acme-system" if="${acme.exists}">
<ant antfile="build.xml" dir="modules/acme" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="ejbca-msae.exists"><available file="modules/msae"/></condition>
<target name="optional-test-msae-unit" if="${ejbca-msae.exists}">
<ant antfile="build.xml" dir="modules/msae" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<condition property="ejbca-rest-api.exists"><available file="modules/ejbca-rest-api"/></condition>
<target name="optional-test-rest-unit" if="${ejbca-rest-api.exists}">
<ant antfile="build.xml" dir="modules/ejbca-rest-api" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<target name="optional-test-rest-system" if="${ejbca-rest-api.exists}">
<ant antfile="build.xml" dir="modules/ejbca-rest-api" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="caa.exists"><available file="modules/caa/build.xml" /></condition>
<target name="optional-test-caa-unit" if="${caa.exists}">
<ant antfile="build.xml" dir="modules/caa" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<target name="optional-test-caa-system" if="${caa.exists}">
<ant antfile="build.xml" dir="modules/caa" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="mpic.exists"><available file="modules/caa/build.xml" /></condition>
<target name="optional-test-mpic-unit" if="${mpic.exists}">
<ant antfile="build.xml" dir="modules/mpic" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<target name="optional-test-mpic-system" if="${mpic.exists}">
<ant antfile="build.xml" dir="modules/mpic" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="ssh.exists"><available file="modules/ssh/build.xml" /></condition>
<target name="optional-test-ssh-unit" if="${ssh.exists}">
<ant antfile="build.xml" dir="modules/ssh" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<target name="optional-test-ssh-system" if="${ssh.exists}">
<ant antfile="build.xml" dir="modules/ssh" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<condition property="cits.exists"><available file="modules/cits/build.xml" /></condition>
<target name="optional-test-cits-unit" if="${cits.exists}">
<ant antfile="build.xml" dir="modules/cits" target="test:unit" inheritall="true" inheritrefs="true"/>
</target>
<target name="optional-test-cits-system" if="${cits.exists}">
<ant antfile="build.xml" dir="modules/cits" target="test:system" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runone" description="run a single Test specified -Dtest.runone=classname" depends="deleteDirectories">
<fail message="'test.runone' is not set. Example -Dtest.runone=TestDnComponents . You can also use -Dtest.showoutput=true to send test output to console." unless="test.runone" />
<!-- Locate the right module where the test resides.. -->
<pathconvert property="test-fullname" dirsep="/" pathsep=" " setonempty="false">
<path>
<fileset dir="${ejbca.home}" id="test.runone.fileset">
<include name="modules/ejbca-ejb/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-entity/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-ws/src-test/**/${test.runone}.java" />
<include name="modules/systemtests/src-test/**/${test.runone}.java" />
<include name="modules/statedump/src-test/**/${test.runone}.java" />
<include name="modules/clientToolBox/src-test/**/${test.runone}.java" />
<include name="modules/configdump/src-test/**/${test.runone}.java" />
<include name="modules/ct/src-test/**/${test.runone}.java" />
<include name="modules/peerconnector/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-common/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-common-web/src-test/**/${test.runone}.java" />
<include name="modules/cesecore-common/src-test/**/${test.runone}.java" />
<include name="modules/cesecore-ejb/src-test/**/${test.runone}.java" />
<include name="modules/cesecore-ejb-interface/src-test/**/${test.runone}.java" />
<include name="modules/cesecore-entity/src-test/**/${test.runone}.java" />
<include name="modules/cmpProxy/src-test/**/${test.runone}.java" />
<include name="modules/va/publisher/src-test/**/${test.runone}.java" />
<include name="modules/acme/src-test/**/${test.runone}.java" />
<include name="modules/acme/src-common-test/**/${test.runone}.java" />
<include name="modules/caa/src-test/**/${test.runone}.java" />
<include name="modules/iodef/src-test/**/${test.runone}.java" />
<include name="modules/mpic/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-ws-cli/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-rest-api/src-test/**/${test.runone}.java" />
<include name="modules/admin-gui/src-test/**/${test.runone}.java" />
<include name="modules/ra-gui/src-test/**/${test.runone}.java" />
<include name="modules/plugins/src-test/**/${test.runone}.java" />
<include name="modules/plugins-ee/src-test/**/${test.runone}.java" />
<include name="modules/cli-util/src-test/**/${test.runone}.java" />
<include name="modules/ejbca-ejb-cli/src-test/**/${test.runone}.java" />
<include name="modules/ssh/src-test/**/${test.runone}.java" />
<include name="modules/msae/src-test/**/${test.runone}.java" />
<include name="modules/cits/src-test/**/${test.runone}.java" />
<include name="modules/cesecore-x509ca/src-test/**/${test.runone}.java" />
</fileset>
</path>
<map from="${ejbca.home}/" to=""/>
</pathconvert>
<echo message="${test-fullname}"/>
<condition property="module" value="modules/ejbca-ejb">
<matches string="${test-fullname}" pattern="^modules/ejbca-ejb/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-entity">
<matches string="${test-fullname}" pattern="^modules/ejbca-entity/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-ws">
<matches string="${test-fullname}" pattern="^modules/ejbca-ws/.*$"/>
</condition>
<condition property="module" value="modules/statedump">
<matches string="${test-fullname}" pattern="^modules/statedump/.*$"/>
</condition>
<condition property="module" value="modules/clientToolBox">
<matches string="${test-fullname}" pattern="^modules/clientToolBox/.*$"/>
</condition>
<condition property="module" value="modules/configdump">
<matches string="${test-fullname}" pattern="^modules/configdump/.*$"/>
</condition>
<condition property="module" value="modules/ct">
<matches string="${test-fullname}" pattern="^modules/ct/.*$"/>
</condition>
<condition property="module" value="modules/ssh">
<matches string="${test-fullname}" pattern="^modules/ssh/.*$"/>
</condition>
<condition property="module" value="modules/systemtests">
<matches string="${test-fullname}" pattern="^modules/systemtests/.*$"/>
</condition>
<condition property="module" value="modules/peerconnector">
<matches string="${test-fullname}" pattern="^modules/peerconnector/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-common">
<matches string="${test-fullname}" pattern="^modules/ejbca-common/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-common-web">
<matches string="${test-fullname}" pattern="^modules/ejbca-common-web/.*$"/>
</condition>
<condition property="module" value="modules/cesecore-common">
<matches string="${test-fullname}" pattern="^modules/cesecore-common/.*$"/>
</condition>
<condition property="module" value="modules/cesecore-ejb">
<matches string="${test-fullname}" pattern="^modules/cesecore-ejb/.*$"/>
</condition>
<condition property="module" value="modules/cesecore-ejb-interface">
<matches string="${test-fullname}" pattern="^modules/cesecore-ejb-interface/.*$"/>
</condition>
<condition property="module" value="modules/cesecore-entity">
<matches string="${test-fullname}" pattern="^modules/cesecore-entity/.*$"/>
</condition>
<condition property="module" value="modules/cmpProxy">
<matches string="${test-fullname}" pattern="^modules/cmpProxy/.*$"/>
</condition>
<condition property="module" value="modules/va">
<matches string="${test-fullname}" pattern="^modules/va/publisher/.*$"/>
</condition>
<condition property="test-buildfile" value="build-http.xml" else="build.xml">
<matches string="${test-fullname}" pattern="^modules/cmpProxy/.*$"/>
</condition>
<condition property="module" value="modules/acme">
<matches string="${test-fullname}" pattern="^modules/acme/.*$"/>
</condition>
<condition property="module" value="modules/caa">
<matches string="${test-fullname}" pattern="^modules/caa/.*$"/>
</condition>
<condition property="module" value="modules/iodef">
<matches string="${test-fullname}" pattern="^modules/iodef/.*$"/>
</condition>
<condition property="module" value="modules/mpic">
<matches string="${test-fullname}" pattern="^modules/mpic/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-ws-cli">
<matches string="${test-fullname}" pattern="^modules/ejbca-ws-cli/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-rest-api">
<matches string="${test-fullname}" pattern="^modules/ejbca-rest-api/.*$"/>
</condition>
<condition property="module" value="modules/admin-gui">
<matches string="${test-fullname}" pattern="^modules/admin-gui/.*$"/>
</condition>
<condition property="module" value="modules/ra-gui">
<matches string="${test-fullname}" pattern="^modules/ra-gui/.*$"/>
</condition>
<condition property="module" value="modules/plugins">
<matches string="${test-fullname}" pattern="^modules/plugins/.*$"/>
</condition>
<condition property="module" value="modules/plugins-ee">
<matches string="${test-fullname}" pattern="^modules/plugins-ee/.*$"/>
</condition>
<condition property="module" value="modules/cli-util">
<matches string="${test-fullname}" pattern="^modules/cli-util/.*$"/>
</condition>
<condition property="module" value="modules/ejbca-ejb-cli">
<matches string="${test-fullname}" pattern="^modules/ejbca-ejb-cli/.*$"/>
</condition>
<condition property="module" value="modules/msae">
<matches string="${test-fullname}" pattern="^modules/msae/.*$"/>
</condition>
<condition property="module" value="modules/cits">
<matches string="${test-fullname}" pattern="^modules/cits/.*$"/>
</condition>
<condition property="module" value="modules/cesecore-x509ca">
<matches string="${test-fullname}" pattern="^modules/cesecore-x509ca/.*$"/>
</condition>
<fail message="The requested test '${test.runone}' was not found." unless="module"/>
<ant antfile="${test-buildfile}" dir="${module}" target="runone" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runlots" description="run JUnit testcases that creates lots of users and certificates" >
<ant antfile="build.xml" dir="modules/systemtests" target="runlotsofusers" inheritall="true" inheritrefs="true"/>
<ant antfile="build.xml" dir="modules/systemtests" target="runperf" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runlotsperuser" description="run JUnit testcases that creates lots of users and certificates for each user">
<ant antfile="build.xml" dir="modules/systemtests" target="runlotsperuser" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runperf" description="run JUnit performance tests">
<ant antfile="build.xml" dir="modules/systemtests" target="runperf" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runweb" description="run JUnit web system tests" depends="deleteDirectories" >
<ant antfile="build.xml" dir="modules/systemtests" target="runweb" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runcmpra" description="run JUnit CMP RA system tests" depends="deleteDirectories" >
<ant antfile="build.xml" dir="modules/systemtests" target="runcmp" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:logstress" description="Run log stress tests." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/systemtests" target="runlogstress" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runws" description="Run web service tests." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/systemtests" target="runws" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:dbschema" description="run JUnit test to validate the schema of the configured database" depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-entity" target="test-dbschema" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:statedump" description="run all System tests for statedump." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/statedump" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:configdump" description="run JUnit Configdump test." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/configdump" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:configdump" description="run System Configdump test." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/configdump" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:msae" description="run JUnit MSAE test." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/msae" inheritall="true" inheritrefs="true">
<target name="test:unit" />
</ant>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:cits" description="run JUnit CITS test." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/cits" inheritall="true" inheritrefs="true">
<target name="test:unit" />
</ant>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:caa" description="run JUnit CAA test." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/caa" inheritall="true" inheritrefs="true">
<target name="test" />
</ant>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:clientToolBox" description="run JUnit ClientToolBox tests." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/clientToolBox" inheritall="true" inheritrefs="true">
<target name="test:stress" />
</ant>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ct" description="run JUnit Certificate Transparency test." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ct" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:test:peerconnector" depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/peerconnector" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:test:peerconnector" depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/peerconnector" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-rest-api" description="run all JUnit tests for ejbca-rest-api." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-rest-api" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:ejbca-rest-api" description="run all System tests for ejbca-rest-api." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-rest-api" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-ejb" description="run all JUnit tests for ejbca-ejb module." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-ejb" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-entity" description="run all JUnit tests for ejbca-entity module." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-entity" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:ejbca-ws" description="run all System tests for ejbca-ws module." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-ws" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-ws-cli" description="run all JUnit tests for ejbca-ws-cli module." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-ws-cli" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:acme" description="run all JUnit tests for ACME." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/acme" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:acme" description="run all System tests for ACME." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/acme" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:admingui" description="run all JUnit tests for CA UI." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/admin-gui" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ra-gui" description="run all JUnit tests for RA UI." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ra-gui" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-common-web" description="run all JUnit tests for ejbca-common-web." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-common-web" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-common" description="run all JUnit tests for ejbca-common." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-common" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ejbca-ejb-cli" description="run all JUnit tests for ejbca-ejb-cli." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ejbca-ejb-cli" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:cesecore-ejb" description="run all JUnit tests for cesecore-ejb." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/cesecore-ejb" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:cesecore-ejb-interface" description="run all JUnit tests for cesecore-ejb-interface." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/cesecore-ejb-interface" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:plugins" description="run all JUnit tests for plugins." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/plugins" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:plugins" description="run all System tests for plugins." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/plugins" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:cesecore-common" description="run all JUnit tests for cesecore-common." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/cesecore-common" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:caa" description="run all JUnit tests for caa." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/caa" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:caa" description="run all System tests for caa." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/caa" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:mpic" description="run all JUnit tests for mpic." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/mpic" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:mpic" description="run all System tests for mpic." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/mpic" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:cesecore-entity" description="run all JUnit tests for cesecore-entity." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/cesecore-entity" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:cesecore-x509ca" description="run all JUnit tests for cesecore-x509ca." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/cesecore-x509ca" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:healthcheck-war" description="run all JUnit tests for healthcheck-war." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/healthcheck-war" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:plugins-ee" description="run all JUnit tests for plugins-ee." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/plugins-ee" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:plugins-ee" description="run all System tests for plugins-ee." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/plugins-ee" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:unit:ssh" description="run all JUnit tests for ssh." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ssh" target="test:unit" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:system:ssh" description="run all System tests for ssh." depends="deleteDirectories">
<ant antfile="build.xml" dir="modules/ssh" target="test:system" inheritall="true" inheritrefs="true"/>
<antcall target="createreport" inheritall="true" inheritrefs="true"/>
</target>
<target name="coverage:report-systemtest-processor" description="internal only: process coverage for system test.">
<mkdir dir="./reports/coverage-report"/>
<java jar="lib/coverage/jacococli.jar" fork="true" failonerror="false">
<!-- TODO: not included now statedump, unidfnr -->
<arg line="report jacoco.exec --csv ./reports/coverage-report/coverage-report.csv --html ./reports/coverage-report/html-report
--sourcefiles ./modules/acme/src
--sourcefiles ./modules/admin-gui/src
--sourcefiles ./modules/caa/src
--sourcefiles ./modules/certificatestore/src
--sourcefiles ./modules/cesecore-common/src
--sourcefiles ./modules/cesecore-cvcca/src
--sourcefiles ./modules/cesecore-ejb/src
--sourcefiles ./modules/cesecore-entity/src
--sourcefiles ./modules/cesecore-x509ca/src
--sourcefiles ./modules/cits/src
--sourcefiles ./modules/clearcache-war/src
--sourcefiles ./modules/clientToolBox/src
--sourcefiles ./modules/cmpclient/src
--sourcefiles ./modules/configdump/src-common
--sourcefiles ./modules/configdump/src-ejb
--sourcefiles ./modules/crlstore/src
--sourcefiles ./modules/ct/src
--sourcefiles ./modules/edition-specific-ee/src-ejb
--sourcefiles ./modules/ejbca-cmp-war/src
--sourcefiles ./modules/ejbca-common/src
--sourcefiles ./modules/ejbca-common-web/src
--sourcefiles ./modules/ejbca-ejb/src
--sourcefiles ./modules/ejbca-ejb-cli/src
--sourcefiles ./modules/ejbca-entity/src
--sourcefiles ./modules/ejbca-properties/src
--sourcefiles ./modules/ejbca-rest-api/src
--sourcefiles ./modules/ejbca-rest-ca/src
--sourcefiles ./modules/ejbca-rest-camanagement/src
--sourcefiles ./modules/ejbca-rest-certificate/src
--sourcefiles ./modules/ejbca-rest-coap/src
--sourcefiles ./modules/ejbca-rest-common/src
--sourcefiles ./modules/ejbca-rest-configdump/src
--sourcefiles ./modules/ejbca-rest-cryptotoken/src
--sourcefiles ./modules/ejbca-rest-endentity/src
--sourcefiles ./modules/ejbca-rest-ssh/src
--sourcefiles ./modules/ejbca-rest-system/src
--sourcefiles ./modules/ejbca-scep-war/src
--sourcefiles ./modules/ejbca-webdist-war/src
--sourcefiles ./modules/ejbca-ws/src
--sourcefiles ./modules/ejbca-ws-cli/src
--sourcefiles ./modules/est/src
--sourcefiles ./modules/healthcheck-war/src
--sourcefiles ./modules/iodef/src
--sourcefiles ./modules/mpic/src
--sourcefiles ./modules/msae/src
--sourcefiles ./modules/plugins/src
--sourcefiles ./modules/plugins-ee/src
--sourcefiles ./modules/proxy-ca/src
--sourcefiles ./modules/ra-gui/src
--sourcefiles ./modules/ssh/src
--sourcefiles ./modules/ssh/src-war
--sourcefiles ./modules/va/src-war
--sourcefiles ./modules/peerconnector/src-cli
--sourcefiles ./modules/peerconnector/src-common
--sourcefiles ./modules/peerconnector/src-ejb
--sourcefiles ./modules/peerconnector/src-interface
--sourcefiles ./modules/peerconnector/src-publ
--sourcefiles ./modules/peerconnector/src-ra
--sourcefiles ./modules/peerconnector/src-rar
--sourcefiles ./modules/peerconnector/src-war
--classfiles ./modules/acme/build
--classfiles ./modules/admin-gui/build
--classfiles ./modules/caa/build
--classfiles ./modules/certificatestore/build-certstore
--classfiles ./modules/cesecore-common/build
--classfiles ./modules/cesecore-cvcca/build
--classfiles ./modules/cesecore-ejb/build
--classfiles ./modules/cesecore-entity/build
--classfiles ./modules/cesecore-x509ca/build
--classfiles ./modules/cits/build
--classfiles ./modules/clearcache-war/build
--classfiles ./modules/clientToolBox/build
--classfiles ./modules/configdump/build-common
--classfiles ./modules/configdump/build-ejb
--classfiles ./modules/crlstore/build-crlstore
--classfiles ./modules/ct/build
--classfiles ./modules/edition-specific-ee/build
--classfiles ./modules/ejbca-cmp-war/build
--classfiles ./modules/ejbca-common/build-common
--classfiles ./modules/ejbca-common-web/build-common-web
--classfiles ./modules/ejbca-ejb/build
--classfiles ./modules/ejbca-ejb-cli/build
--classfiles ./modules/ejbca-entity/build
--classfiles ./modules/ejbca-properties/build
--classfiles ./modules/ejbca-rest-api/build
--classfiles ./modules/ejbca-rest-ca/build
--classfiles ./modules/ejbca-rest-camanagement/build
--classfiles ./modules/ejbca-rest-certificate/build
--classfiles ./modules/ejbca-rest-coap/build
--classfiles ./modules/ejbca-rest-common/build
--classfiles ./modules/ejbca-rest-configdump/build
--classfiles ./modules/ejbca-rest-cryptotoken/build
--classfiles ./modules/ejbca-rest-endentity/build
--classfiles ./modules/ejbca-rest-ssh/build
--classfiles ./modules/ejbca-rest-system/build
--classfiles ./modules/ejbca-scep-war/build
--classfiles ./modules/ejbca-webdist-war/build
--classfiles ./modules/ejbca-ws/build
--classfiles ./modules/ejbca-ws-cli/build
--classfiles ./modules/est/build-war
--classfiles ./modules/healthcheck-war/build
--classfiles ./modules/iodef/build
--classfiles ./modules/mpic/build
--classfiles ./modules/msae/build
--classfiles ./modules/plugins/build-plugins
--classfiles ./modules/plugins-ee/build-plugins-ee
--classfiles ./modules/proxy-ca/build
--classfiles ./modules/ra-gui/build
--classfiles ./modules/ssh/build-ssh
--classfiles ./modules/ssh/build-war
--classfiles ./modules/va/build-status
--classfiles ./modules/peerconnector/build-cli
--classfiles ./modules/peerconnector/build-common
--classfiles ./modules/peerconnector/build-ejb
--classfiles ./modules/peerconnector/build-interface
--classfiles ./modules/peerconnector/build-publ
--classfiles ./modules/peerconnector/build-ra
--classfiles ./modules/peerconnector/build-rar
--classfiles ./modules/peerconnector/build-war
"/>
<classpath>
<pathelement location="lib/jacococli.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
<java jar="lib/coverage/DecorateCoverageReport.jar" fork="true" failonerror="false">
<arg line="updatedfiles.txt"/>
</java>
</target>
<target name="coverage:reset-systemtest" description="remove coverage for system test in wildfly.">
<java jar="lib/coverage/jacococli.jar" fork="true" failonerror="false" maxmemory="128m">
<arg line="dump --reset --address localhost --port 8079 --destfile jacoco.exec"/>
<classpath>
<pathelement location="lib/jacococli.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
<delete file="jacoco.exec"/>
</target>
<target name="coverage:report-systemtest" description="get coverage for system test. automatically adds links to updated classes after split from main. additional files can be added as updatedfiles.txt in project base directory">
<java jar="lib/coverage/jacococli.jar" fork="true" failonerror="false">
<arg line="dump --reset --address localhost --port 8079 --destfile jacoco.exec"/>
<classpath>
<pathelement location="lib/jacococli.jar"/>
<pathelement path="${java.class.path}"/>
</classpath>
</java>
<antcall target="coverage:report-systemtest-processor" inheritall="true" inheritrefs="true"/>
</target>
<target name="test:runone-coverage-systemtest" description="run a single Test and report coverage specified -Dtest.runone=classname" depends="deleteDirectories">
<antcall target="coverage:reset-systemtest" inheritall="true" inheritrefs="true"/>
<antcall target="test:runone" inheritall="true" inheritrefs="true">
<param name="test.runone" value="${test.runone}"/>
</antcall>
<antcall target="coverage:report-systemtest" inheritall="true" inheritrefs="true"/>
</target>
<target name="createreport">
<junitreport todir="${reports.dir}">
<fileset dir="${reports.dir}">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="${reports.dir}/html" />
</junitreport>
<echo message="" />
<echo message="Results are available in file://${reports.dir}/html/index.html" />
</target>
</project>