-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-tests.xml
1097 lines (993 loc) · 54.3 KB
/
build-tests.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
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- ======================================================================= -->
<!-- Wrapper build file -->
<!-- ======================================================================= -->
<project name="wrapper-tests" default="test-setup" basedir=".">
<!-- Local build properties -->
<property file="${user.home}/.ant.local.properties" />
<!-- platform -->
<property name="is.${os.name}" value="true"/>
<property name="test.dir" value="${basedir}/test"/>
<property name="src.dir" value="${basedir}/src"/>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
<echo message="Use the -projecthelp option instead"/>
</target>
<target name="help" depends="usage"/>
<!-- =================================================================== -->
<!-- Resolve Platform properties -->
<!-- =================================================================== -->
<target name="init-windows-nt" if="is.Windows NT">
<property name="is.Windows" value="true"/>
</target>
<target name="init-windows-2000" if="is.Windows 2000">
<property name="is.Windows" value="true"/>
</target>
<target name="init-windows-xp" if="is.Windows XP">
<property name="is.Windows" value="true"/>
</target>
<target name="init-windows-2003" if="is.Windows 2003">
<property name="is.Windows" value="true"/>
</target>
<target name="init-windows-vista" if="is.Windows Vista">
<property name="is.Windows" value="true"/>
</target>
<target name="init-windows-7" if="is.Windows 7">
<property name="is.Windows" value="true"/>
</target>
<target name="init-windows"
depends="init-windows-nt, init-windows-2000, init-windows-xp, init-windows-2003, init-windows-vista, init-windows-7"
if="is.Windows">
<property name="is.shell.bat" value="true"/>
</target>
<target name="init-linux" if="is.Linux">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-solaris" if="is.SunOS">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-aix" if="is.AIX">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-hpux" if="is.HP-UX">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-macosx" if="is.Mac OS X">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-osf1" if="is.OSF1">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-freebsd" if="is.FreeBSD">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<target name="init-irix" if="is.Irix">
<property name="is.Unix" value="true"/>
<property name="is.shell.sh" value="true"/>
</target>
<!-- =================================================================== -->
<!-- Initialize build. -->
<!-- =================================================================== -->
<target name="init" depends="init-windows, init-linux, init-solaris, init-aix, init-hpux, init-macosx, init-osf1, init-freebsd, init-irix">
</target>
<!-- =================================================================== -->
<!-- Test Setup target (Common) -->
<!-- =================================================================== -->
<target name="test-setup-common" depends="init">
<!-- Create a template wrapper.conf file that will be used to create the files for
each of the additional conf files for each test. -->
<delete file="${test.dir}/template.conf"/>
<copy file="${src.dir}/conf/wrapper.conf.in"
tofile="${test.dir}/template.conf"/>
<replace file="${test.dir}/template.conf">
<replacetoken>wrapper.java.classpath.1=../lib/wrapper.jar</replacetoken>
<replacevalue><![CDATA[wrapper.java.classpath.1=../lib/wrappertest.jar
wrapper.java.classpath.2=../lib/wrapper.jar]]></replacevalue>
</replace>
<replace file="${test.dir}/template.conf"
token="wrapper.logfile=../logs/wrapper.log"
value="wrapper.logfile=../test/testwrapper.log" />
<!-- Background Threads Test -->
<delete file="${test.dir}/backgroundthreads.conf"/>
<filter token="app.name" value="backgroundthreads"/>
<filter token="app.long.name" value="Background Threads Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/backgroundthreads.conf"
filtering="on"/>
<replace file="${test.dir}/backgroundthreads.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.BackgroundThreads" />
<!-- Long Running Background Threads Test -->
<delete file="${test.dir}/longrunningbackgroundthreads.conf"/>
<filter token="app.name" value="longrunningbackgroundthreads"/>
<filter token="app.long.name" value="Long Running Background Threads Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/longrunningbackgroundthreads.conf"
filtering="on"/>
<replace file="${test.dir}/longrunningbackgroundthreads.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.LongRunningBackgroundThreads" />
<!-- Daemon Threads Test -->
<delete file="${test.dir}/daemonthreads.conf"/>
<filter token="app.name" value="daemonthreads"/>
<filter token="app.long.name" value="Daemon Threads Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/daemonthreads.conf"
filtering="on"/>
<replace file="${test.dir}/daemonthreads.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.DaemonThreads" />
<!-- Simple WrapperListener Test -->
<delete file="${test.dir}/simplewrapperlistener.conf"/>
<filter token="app.name" value="simplewrapperlistener"/>
<filter token="app.long.name" value="Simple WrapperListener Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/simplewrapperlistener.conf"
filtering="on"/>
<replace file="${test.dir}/simplewrapperlistener.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.test.SimpleWrapperListener" />
<replace file="${test.dir}/simplewrapperlistener.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=" />
<!-- Nested WrapperListener Test -->
<delete file="${test.dir}/nestedwrapperlistener.conf"/>
<filter token="app.name" value="nestedwrapperlistener"/>
<filter token="app.long.name" value="Nested WrapperListener Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/nestedwrapperlistener.conf"
filtering="on"/>
<replace file="${test.dir}/nestedwrapperlistener.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.NestedWrapperListener" />
<!-- No Return Test -->
<delete file="${test.dir}/noreturn.conf"/>
<filter token="app.name" value="noreturn"/>
<filter token="app.long.name" value="No Return Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/noreturn.conf"
filtering="on"/>
<replace file="${test.dir}/noreturn.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.NoReturn" />
<!-- Quick Complete Test -->
<delete file="${test.dir}/quickcomplete.conf"/>
<filter token="app.name" value="quickcomplete"/>
<filter token="app.long.name" value="Quick Complete Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/quickcomplete.conf"
filtering="on"/>
<replace file="${test.dir}/quickcomplete.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.QuickComplete" />
<!-- Environment Variables Test -->
<delete file="${test.dir}/envvars.conf"/>
<filter token="app.name" value="envvars"/>
<filter token="app.long.name" value="Environment Variables Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/envvars.conf"
filtering="on"/>
<replace file="${test.dir}/envvars.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.EnvironmentVariables" />
<!-- Percent Output Crash Test -->
<delete file="${test.dir}/percentoutput.conf"/>
<filter token="app.name" value="percentoutput"/>
<filter token="app.long.name" value="Percent Output Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/percentoutput.conf"
filtering="on"/>
<replace file="${test.dir}/percentoutput.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.PercentOutput" />
<!-- Log Output Test -->
<delete file="${test.dir}/logoutput.conf"/>
<filter token="app.name" value="logoutput"/>
<filter token="app.long.name" value="Log Output Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/logoutput.conf"
filtering="on"/>
<replace file="${test.dir}/logoutput.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.LogOutput" />
<!-- Loaded Log Output Test -->
<delete file="${test.dir}/loadedlogoutput.conf"/>
<filter token="app.name" value="loadedlogoutput"/>
<filter token="app.long.name" value="Loaded Log Output Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/loadedlogoutput.conf"
filtering="on"/>
<replace file="${test.dir}/loadedlogoutput.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.LoadedLogOutput" />
<replace file="${test.dir}/loadedlogoutput.conf">
<replacetoken>wrapper.console.format=PM</replacetoken>
<replacevalue><![CDATA[wrapper.console.format=PZM
wrapper.debug=TRUE]]></replacevalue>
</replace>
<!-- Restarter Test -->
<delete file="${test.dir}/restarter.conf"/>
<filter token="app.name" value="restarter"/>
<filter token="app.long.name" value="Restarter Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/restarter.conf"
filtering="on"/>
<replace file="${test.dir}/restarter.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.test.Restarter" />
<!-- WrapperSimpleApp Test -->
<delete file="${test.dir}/stopwhilestarting.conf"/>
<filter token="app.name" value="stopwhilestarting"/>
<filter token="app.long.name" value="StopWhileStarting Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/stopwhilestarting.conf"
filtering="on"/>
<replace file="${test.dir}/stopwhilestarting.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.test.StopWhileStarting" />
<replace file="${test.dir}/stopwhilestarting.conf">
<replacetoken>wrapper.syslog.loglevel=NONE</replacetoken>
<replacevalue><![CDATA[wrapper.syslog.loglevel=NONE
wrapper.on_exit.99=RESTART]]></replacevalue>
</replace>
<!-- WrapperSimpleAppForceStop Test -->
<delete file="${test.dir}/stopwhilestartingforcestop.conf"/>
<filter token="app.name" value="stopwhilestartingforcestop"/>
<filter token="app.long.name" value="StopWhileStarting ForceStop Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/stopwhilestartingforcestop.conf"
filtering="on"/>
<replace file="${test.dir}/stopwhilestartingforcestop.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.test.StopWhileStarting" />
<replace file="${test.dir}/stopwhilestartingforcestop.conf">
<replacetoken>wrapper.syslog.loglevel=NONE</replacetoken>
<replacevalue><![CDATA[wrapper.syslog.loglevel=NONE
wrapper.on_exit.99=RESTART
wrapper.listener.force_stop=TRUE]]></replacevalue>
</replace>
<!-- Shutdown Hook Test -->
<delete file="${test.dir}/shutdownhook.conf"/>
<filter token="app.name" value="shutdownhook"/>
<filter token="app.long.name" value="Shutdown Hook Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/shutdownhook.conf"
filtering="on"/>
<replace file="${test.dir}/shutdownhook.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.ShutdownHook" />
<!-- Shutdown Lock Test -->
<delete file="${test.dir}/shutdownlock.conf"/>
<filter token="app.name" value="shutdownlock"/>
<filter token="app.long.name" value="Shutdown Lock Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/shutdownlock.conf"
filtering="on"/>
<replace file="${test.dir}/shutdownlock.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.ShutdownLock" />
<!-- OutputLoader Test -->
<delete file="${test.dir}/outputloader.conf"/>
<filter token="app.name" value="outputloader"/>
<filter token="app.long.name" value="Output Loader Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/outputloader.conf"
filtering="on"/>
<replace file="${test.dir}/outputloader.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.OutputLoader" />
<!-- Memory Test -->
<delete file="${test.dir}/memory.conf"/>
<filter token="app.name" value="memory"/>
<filter token="app.long.name" value="Memory Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/memory.conf"
filtering="on"/>
<replace file="${test.dir}/memory.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.Memory" />
<!-- Filter Test -->
<delete file="${test.dir}/filter.conf"/>
<filter token="app.name" value="filter"/>
<filter token="app.long.name" value="Filter Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/filter.conf"
filtering="on"/>
<replace file="${test.dir}/filter.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.Filter" />
<replace file="${test.dir}/filter.conf">
<replacetoken>wrapper.syslog.loglevel=NONE</replacetoken>
<replacevalue><![CDATA[wrapper.syslog.loglevel=NONE
wrapper.filter.trigger.1=NONERROR
wrapper.filter.action.1=NONE
wrapper.filter.trigger.2=ERROR
wrapper.filter.action.2=RESTART
wrapper.filter.trigger.3=Nice long restart message.
wrapper.filter.action.3=RESTART
wrapper.filter.trigger.4=DUMP -n- RESTART
wrapper.filter.action.4=DUMP,RESTART
wrapper.filter.trigger.5=HEAD*TAIL
wrapper.filter.allow_wildcards.5=TRUE
wrapper.filter.action.5=RESTART
wrapper.filter.trigger.6=ALLDONE
wrapper.filter.action.6=SHUTDOWN
wrapper.max_failed_invocations=7]]></replacevalue>
</replace>
<!-- OnExit Test -->
<delete file="${test.dir}/onexit.conf"/>
<filter token="app.name" value="onexit"/>
<filter token="app.long.name" value="OnExit Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/onexit.conf"
filtering="on"/>
<replace file="${test.dir}/onexit.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.OnExit" />
<replace file="${test.dir}/onexit.conf">
<replacetoken>wrapper.syslog.loglevel=NONE</replacetoken>
<replacevalue><![CDATA[wrapper.syslog.loglevel=NONE
wrapper.on_exit.1=RESTART
wrapper.on_exit.3=SHUTDOWN
wrapper.on_exit.default=RESTART]]></replacevalue>
</replace>
<!-- Loaded WrapperListener Test -->
<delete file="${test.dir}/loadedwrapperlistener.conf"/>
<filter token="app.name" value="loadedwrapperlistener"/>
<filter token="app.long.name" value="Loaded WrapperListener Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/loadedwrapperlistener.conf"
filtering="on"/>
<replace file="${test.dir}/loadedwrapperlistener.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.test.LoadedWrapperListener" />
<replace file="${test.dir}/loadedwrapperlistener.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.debug=TRUE" />
<replace file="${test.dir}/loadedwrapperlistener.conf"
token="#wrapper.java.initmemory=3"
value="wrapper.java.initmemory=256" />
<replace file="${test.dir}/loadedwrapperlistener.conf"
token="#wrapper.java.maxmemory=64"
value="wrapper.java.maxmemory=256" />
<replace file="${test.dir}/loadedwrapperlistener.conf"
token="wrapper.ntservice.process_priority=NORMAL"
value="wrapper.ntservice.process_priority=HIGH" />
<!-- System Property Test -->
<delete file="${test.dir}/systemproperty.conf"/>
<filter token="app.name" value="systemproperty"/>
<filter token="app.long.name" value="System Property Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/systemproperty.conf"
filtering="on"/>
<replace file="${test.dir}/systemproperty.conf">
<replacetoken>wrapper.java.additional.1=</replacetoken>
<replacevalue><![CDATA[wrapper.java.additional.1=-DVAR1="abc"
wrapper.java.additional.1.stripquotes=TRUE
wrapper.java.additional.2=-DVAR2="\\"
wrapper.java.additional.2.stripquotes=TRUE
wrapper.java.additional.3=-DVAR3="\""
wrapper.java.additional.3.stripquotes=TRUE
wrapper.java.additional.4=-DVAR4=abc
wrapper.java.additional.5=-DVAR5=\
wrapper.java.additional.6=-DVAR6=\\
wrapper.java.additional.7=-DVAR7=\"
wrapper.java.additional.7.stripquotes=TRUE]]></replacevalue>
</replace>
<replace file="${test.dir}/systemproperty.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=org.tanukisoftware.wrapper.test.SystemProperty" />
<!-- ExecutableJar Test -->
<delete file="${test.dir}/executablejar.conf"/>
<filter token="app.name" value="executablejar"/>
<filter token="app.long.name" value="Executable Jar Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/executablejar.conf"
filtering="on"/>
<replace file="${test.dir}/executablejar.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp" />
<replace file="${test.dir}/executablejar.conf">
<replacetoken><![CDATA[wrapper.java.classpath.1=../lib/wrappertest.jar
wrapper.java.classpath.2=../lib/wrapper.jar]]></replacetoken>
<replacevalue>wrapper.java.classpath.1=../lib/wrapper.jar</replacevalue>
</replace>
<replace file="${test.dir}/executablejar.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=../lib/wrappertest.jar" />
<!-- ExecutableJarInitFail Test -->
<delete file="${test.dir}/executablejarinitfail.conf"/>
<filter token="app.name" value="executablejarinitfail"/>
<filter token="app.long.name" value="Executable Jar Init Fail Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/executablejarinitfail.conf"
filtering="on"/>
<replace file="${test.dir}/executablejarinitfail.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp" />
<replace file="${test.dir}/executablejarinitfail.conf">
<replacetoken><![CDATA[wrapper.java.classpath.1=../lib/wrappertest.jar
wrapper.java.classpath.2=../lib/wrapper.jar]]></replacetoken>
<replacevalue>wrapper.java.classpath.1=../lib/wrapper.jar</replacevalue>
</replace>
<replace file="${test.dir}/executablejarinitfail.conf"
token="wrapper.java.additional.1="
value="wrapper.java.additional.1=-DJarMain.init.fail=TRUE" />
<replace file="${test.dir}/executablejarinitfail.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=../lib/wrappertest.jar" />
<!-- ExecutableJarCP Test -->
<delete file="${test.dir}/executablejarcp.conf"/>
<filter token="app.name" value="executablejarcp"/>
<filter token="app.long.name" value="Executable Jar w/Classpath Case" />
<copy file="${test.dir}/template.conf"
tofile="${test.dir}/executablejarcp.conf"
filtering="on"/>
<replace file="${test.dir}/executablejarcp.conf"
token="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp"
value="wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp" />
<replace file="${test.dir}/executablejarcp.conf">
<replacetoken><![CDATA[wrapper.java.classpath.1=../lib/wrappertest.jar
wrapper.java.classpath.2=../lib/wrapper.jar]]></replacetoken>
<replacevalue>wrapper.java.classpath.1=../lib/wrapper.jar</replacevalue>
</replace>
<replace file="${test.dir}/executablejarcp.conf"
token="wrapper.app.parameter.1=<YourMainClass>"
value="wrapper.app.parameter.1=../lib/wrappertest2.jar" />
</target>
<!-- =================================================================== -->
<!-- Test Setup target (Bat files - Windows) -->
<!-- =================================================================== -->
<target name="test-setup-bat" depends="test-setup-common" if="is.shell.bat">
<!-- Create the test specific batch files -->
<!-- Background Threads Test -->
<delete file="${test.dir}/TestBackgroundThreads.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestBackgroundThreads.bat"
filtering="on"/>
<replace file="${test.dir}/TestBackgroundThreads.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestBackgroundThreads.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/backgroundthreads.conf' />
<!-- Long Running Background Threads Test -->
<delete file="${test.dir}/TestLongRunningBackgroundThreads.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestLongRunningBackgroundThreads.bat"
filtering="on"/>
<replace file="${test.dir}/TestLongRunningBackgroundThreads.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestLongRunningBackgroundThreads.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/longrunningbackgroundthreads.conf' />
<!-- Daemon Threads Test -->
<delete file="${test.dir}/TestDaemonThreads.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestDaemonThreads.bat"
filtering="on"/>
<replace file="${test.dir}/TestDaemonThreads.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestDaemonThreads.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/daemonthreads.conf' />
<!-- Simple WrapperListener Test -->
<delete file="${test.dir}/TestSimpleWrapperListener.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestSimpleWrapperListener.bat"
filtering="on"/>
<replace file="${test.dir}/TestSimpleWrapperListener.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestSimpleWrapperListener.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/simplewrapperlistener.conf' />
<!-- Nested WrapperListener Test -->
<delete file="${test.dir}/TestNestedWrapperListener.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestNestedWrapperListener.bat"
filtering="on"/>
<replace file="${test.dir}/TestNestedWrapperListener.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestNestedWrapperListener.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/nestedwrapperlistener.conf' />
<!-- No Return Test -->
<delete file="${test.dir}/TestNoReturn.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestNoReturn.bat"
filtering="on"/>
<replace file="${test.dir}/TestNoReturn.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestNoReturn.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/noreturn.conf' />
<!-- Quick Complete Test -->
<delete file="${test.dir}/TestQuickComplete.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestQuickComplete.bat"
filtering="on"/>
<replace file="${test.dir}/TestQuickComplete.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestQuickComplete.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/quickcomplete.conf' />
<!-- Environment Variables Test -->
<delete file="${test.dir}/TestEnvironmentVariables.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestEnvironmentVariables.bat"
filtering="on"/>
<replace file="${test.dir}/TestEnvironmentVariables.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestEnvironmentVariables.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/envvars.conf' />
<replace file="${test.dir}/TestEnvironmentVariables.bat">
<replacetoken>setlocal</replacetoken>
<replacevalue><![CDATA[setlocal
rem
rem Set up some test environment variables
rem
set ENV_VAR_1=a
set ENV_VAR_2=b
set ENV_VAR_3=c
set ENV_VAR_4=d]]></replacevalue>
</replace>
<!-- Percent Output Test -->
<delete file="${test.dir}/TestPercentOutput.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestPercentOutput.bat"
filtering="on"/>
<replace file="${test.dir}/TestPercentOutput.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestPercentOutput.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/percentoutput.conf' />
<!-- Log Output Test -->
<delete file="${test.dir}/TestLogOutput.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestLogOutput.bat"
filtering="on"/>
<replace file="${test.dir}/TestLogOutput.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestLogOutput.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/logoutput.conf' />
<!-- Loaded Log Output Test -->
<delete file="${test.dir}/TestLoadedLogOutput.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestLoadedLogOutput.bat"
filtering="on"/>
<replace file="${test.dir}/TestLoadedLogOutput.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestLoadedLogOutput.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/loadedlogoutput.conf' />
<!-- Restarter Test -->
<delete file="${test.dir}/TestRestarter.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestRestarter.bat"
filtering="on"/>
<replace file="${test.dir}/TestRestarter.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestRestarter.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/restarter.conf' />
<!-- StopWhileStarting Test -->
<delete file="${test.dir}/TestStopWhileStarting.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestStopWhileStarting.bat"
filtering="on"/>
<replace file="${test.dir}/TestStopWhileStarting.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestStopWhileStarting.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/stopwhilestarting.conf' />
<!-- StopWhileStartingForceStop Test -->
<delete file="${test.dir}/TestStopWhileStartingForceStop.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestStopWhileStartingForceStop.bat"
filtering="on"/>
<replace file="${test.dir}/TestStopWhileStartingForceStop.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestStopWhileStartingForceStop.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/stopwhilestartingforcestop.conf' />
<!-- Shutdown Hook Test -->
<delete file="${test.dir}/TestShutdownHook.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestShutdownHook.bat"
filtering="on"/>
<replace file="${test.dir}/TestShutdownHook.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestShutdownHook.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/shutdownhook.conf' />
<!-- Shutdown Lock Test -->
<delete file="${test.dir}/TestShutdownLock.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestShutdownLock.bat"
filtering="on"/>
<replace file="${test.dir}/TestShutdownLock.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestShutdownLock.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/shutdownlock.conf' />
<!-- Output Loader Test -->
<delete file="${test.dir}/TestOutputLoader.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestOutputLoader.bat"
filtering="on"/>
<replace file="${test.dir}/TestOutputLoader.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestOutputLoader.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/outputloader.conf' />
<!-- Memory Test -->
<delete file="${test.dir}/TestMemory.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestMemory.bat"
filtering="on"/>
<replace file="${test.dir}/TestMemory.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestMemory.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/memory.conf' />
<!-- Filter Test -->
<delete file="${test.dir}/TestFilter.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestFilter.bat"
filtering="on"/>
<replace file="${test.dir}/TestFilter.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestFilter.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/filter.conf' />
<!-- OnExit Test -->
<delete file="${test.dir}/TestOnExit.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestOnExit.bat"
filtering="on"/>
<replace file="${test.dir}/TestOnExit.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestOnExit.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/onexit.conf' />
<!-- Loaded WrapperListener Test -->
<delete file="${test.dir}/TestLoadedWrapperListener.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestLoadedWrapperListener.bat"
filtering="on"/>
<replace file="${test.dir}/TestLoadedWrapperListener.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestLoadedWrapperListener.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/loadedwrapperlistener.conf' />
<!-- System Property Test -->
<delete file="${test.dir}/TestSystemProperty.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestSystemProperty.bat"
filtering="on"/>
<replace file="${test.dir}/TestSystemProperty.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestSystemProperty.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/systemproperty.conf' />
<!-- ExecutableJar Test -->
<delete file="${test.dir}/TestExecutableJar.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestExecutableJar.bat"
filtering="on"/>
<replace file="${test.dir}/TestExecutableJar.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestExecutableJar.bat"
token='set _WRAPPER_CONF="%~f1"'
value='set _WRAPPER_CONF=""' />
<replace file="${test.dir}/TestExecutableJar.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/executablejar.conf' />
<!-- ExecutableJarInitFail Test -->
<delete file="${test.dir}/TestExecutableJarInitFail.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestExecutableJarInitFail.bat"
filtering="on"/>
<replace file="${test.dir}/TestExecutableJarInitFail.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestExecutableJarInitFail.bat"
token='set _WRAPPER_CONF="%~f1"'
value='set _WRAPPER_CONF=""' />
<replace file="${test.dir}/TestExecutableJarInitFail.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/executablejarinitfail.conf' />
<!-- ExecutableJarCP Test -->
<delete file="${test.dir}/TestExecutableJarCP.bat"/>
<copy file="${src.dir}/bin/App.bat.in"
tofile="${test.dir}/TestExecutableJarCP.bat"
filtering="on"/>
<replace file="${test.dir}/TestExecutableJarCP.bat"
token='set _WRAPPER_BASE=wrapper'
value='set _WRAPPER_BASE=..\bin\wrapper' />
<replace file="${test.dir}/TestExecutableJarCP.bat"
token='set _WRAPPER_CONF="%~f1"'
value='set _WRAPPER_CONF=""' />
<replace file="${test.dir}/TestExecutableJarCP.bat"
token='set _WRAPPER_CONF_DEFAULT=../conf/wrapper.conf'
value='set _WRAPPER_CONF_DEFAULT=../test/executablejarcp.conf' />
</target>
<!-- =================================================================== -->
<!-- Test Setup target (sh scripts - Unix, Linux) -->
<!-- =================================================================== -->
<target name="test-setup-sh" depends="test-setup-common" if="is.shell.sh">
<!-- Create a template script to make this easier -->
<delete file="${test.dir}/temp.script.in"/>
<delete file="${test.dir}/action.script.in"/>
<copy file="${src.dir}/bin/sh.script.in"
tofile="${test.dir}/temp.script.in"/>
<copy file="${src.dir}/bin/sh.script.in"
tofile="${test.dir}/action.script.in"/>
</target>
<!-- =================================================================== -->
<!-- Test Setup target (Unix) -->
<!-- =================================================================== -->
<target name="test-setup-unix" depends="test-setup-sh" if="is.Unix">
<!-- Create the test specific script files -->
<replace file="${test.dir}/temp.script.in"
token='WRAPPER_CMD="./wrapper"'
value='WRAPPER_CMD="../bin/wrapper"' />
<replace file="${test.dir}/temp.script.in"
token='WRAPPER_CONF="../conf/wrapper.conf"'
value='WRAPPER_CONF="../test/@[email protected]"' />
<replace file="${test.dir}/temp.script.in"
token="SCRIPT=`$$SCRIPT_DIR/realpath $$0`"
value="SCRIPT=`$$SCRIPT_DIR/../bin/realpath $$0`" />
<!-- Create the action test specific script files -->
<replace file="${test.dir}/action.script.in"
token='WRAPPER_CMD="./wrapper"'
value='WRAPPER_CMD="../bin/wrapper"' />
<replace file="${test.dir}/action.script.in"
token='WRAPPER_CONF="../conf/wrapper.conf"'
value='WRAPPER_CONF="../test/@[email protected]"' />
<replace file="${test.dir}/action.script.in"
token="SCRIPT=`$$SCRIPT_DIR/realpath $$0`"
value="SCRIPT=`$$SCRIPT_DIR/../bin/realpath $$0`" />
<replace file="${test.dir}/action.script.in">
<replacetoken><![CDATA[#PASS_THROUGH=]]></replacetoken>
<replacevalue><![CDATA[PASS_THROUGH=]]></replacevalue>
</replace>
<!-- Background Threads Test -->
<filter token="app.name" value="backgroundthreads"/>
<filter token="app.long.name" value="Background Threads Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/backgroundthreads"
filtering="on"/>
<chmod file="${test.dir}/backgroundthreads" perm="+x"/>
<!-- Long Running Background Threads Test -->
<filter token="app.name" value="longrunningbackgroundthreads"/>
<filter token="app.long.name" value="Long Running Background Threads Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/longrunningbackgroundthreads"
filtering="on"/>
<chmod file="${test.dir}/longrunningbackgroundthreads" perm="+x"/>
<!-- Daemon Threads Test -->
<filter token="app.name" value="daemonthreads"/>
<filter token="app.long.name" value="Daemon Threads Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/daemonthreads"
filtering="on"/>
<chmod file="${test.dir}/daemonthreads" perm="+x"/>
<!-- SimpleWrapperListener Test -->
<filter token="app.name" value="simplewrapperlistener"/>
<filter token="app.long.name" value="Simple WrapperListener Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/simplewrapperlistener"
filtering="on"/>
<chmod file="${test.dir}/simplewrapperlistener" perm="+x"/>
<!-- NestedWrapperListener Test -->
<filter token="app.name" value="nestedwrapperlistener"/>
<filter token="app.long.name" value="Nested WrapperListener Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/nestedwrapperlistener"
filtering="on"/>
<chmod file="${test.dir}/nestedwrapperlistener" perm="+x"/>
<!-- No Return Test -->
<filter token="app.name" value="noreturn"/>
<filter token="app.long.name" value="No Return Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/noreturn"
filtering="on"/>
<chmod file="${test.dir}/noreturn" perm="+x"/>
<!-- Quick Complete Test -->
<filter token="app.name" value="quickcomplete"/>
<filter token="app.long.name" value="Quick Complete Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/quickcomplete"
filtering="on"/>
<chmod file="${test.dir}/quickcomplete" perm="+x"/>
<!-- Environment Variables Test -->
<filter token="app.name" value="envvars"/>
<filter token="app.long.name" value="Environment Variables Case" />
<delete file="${test.dir}/envvars"/>
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/envvars"
filtering="on"/>
<replace file="${test.dir}/envvars">
<replacetoken>the needs of your application</replacetoken>
<replacevalue><![CDATA[the needs of your application
# Set up some test environment variables
export ENV_VAR_1=a
export ENV_VAR_2=b
export ENV_VAR_3=c
export ENV_VAR_4=d]]></replacevalue>
</replace>
<chmod file="${test.dir}/envvars" perm="+x"/>
<!-- Percent Output Test -->
<filter token="app.name" value="percentoutput"/>
<filter token="app.long.name" value="Percent Output Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/percentoutput"
filtering="on"/>
<chmod file="${test.dir}/percentoutput" perm="+x"/>
<!-- Log Output Test -->
<filter token="app.name" value="logoutput"/>
<filter token="app.long.name" value="Log Output Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/logoutput"
filtering="on"/>
<chmod file="${test.dir}/logoutput" perm="+x"/>
<!-- Loaded Log Output Test -->
<filter token="app.name" value="loadedlogoutput"/>
<filter token="app.long.name" value="Loaded Log Output Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/loadedlogoutput"
filtering="on"/>
<chmod file="${test.dir}/loadedlogoutput" perm="+x"/>
<!-- Restarter Test -->
<filter token="app.name" value="restarter"/>
<filter token="app.long.name" value="Restarter Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/restarter"
filtering="on"/>
<chmod file="${test.dir}/restarter" perm="+x"/>
<!-- StopWhileStarting Test -->
<filter token="app.name" value="stopwhilestarting"/>
<filter token="app.long.name" value="StopWhileStarting Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/stopwhilestarting"
filtering="on"/>
<chmod file="${test.dir}/stopwhilestarting" perm="+x"/>
<!-- StopWhileStartingForceStop Test -->
<filter token="app.name" value="stopwhilestartingforcestop"/>
<filter token="app.long.name" value="StopWhileStarting ForceStop Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/stopwhilestartingforcestop"
filtering="on"/>
<chmod file="${test.dir}/stopwhilestartingforcestop" perm="+x"/>
<!-- Shutdown Hook Test -->
<filter token="app.name" value="shutdownhook"/>
<filter token="app.long.name" value="Shutdown Hook Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/shutdownhook"
filtering="on"/>
<chmod file="${test.dir}/shutdownhook" perm="+x"/>
<!-- Shutdown Lock Test -->
<filter token="app.name" value="shutdownlock"/>
<filter token="app.long.name" value="Shutdown Lock Case" />
<copy file="${test.dir}/temp.script.in"
tofile="${test.dir}/shutdownlock"
filtering="on"/>
<chmod file="${test.dir}/shutdownlock" perm="+x"/>