aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile
blob: 41218f84649c5a79d794309158e67ce4a5c99d0b (plain)
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
# Makefile for Ivy test class suite
# it's a bit messy to automate because of specific network settings
# you'll have to play with the network settings to make it run

include ../java.mk # in this file you can change your java compiler and VM
IVYPATH=../build/jar/ivy-java.jar
CLASSPATH=-classpath classes:$(IVYPATH):$(GNUPATH)
SRC = *.java	

# Warning TestNetSwing.java  cant build with jdk1.1
# as Color(r,g,b,a) doesn't exist in jdk1.1

#LOCALNET=10.192.36.255:3456
#LOCALNET=10.0.0.255:3456
#LOCALNET=192.168.19:3456
LOCALNET=
MULTICAST=224.5.6.7:8910
#DOMAIN=
DOMAIN=-b $(MULTICAST)
DEBUG=
#DEBUG= -DIVY_DEBUG

all:
	/bin/rm -fR --  classes
	mkdir classes
	$(JAVAC) -d classes $(JAVACOPTS) $(CLASSPATH) $(SRC)
	@echo "all modules built. run make run"

run: sendnowself nl api filter unitaires probe stop request test1 test2 async
fail: sendnow
	
request:
	@echo "*****************************"
	@echo "TEST REQUEST"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) Request $(DOMAIN)
	@echo "*****************************"
	@echo "TEST REQUEST successful"
	@echo "*****************************"
	@echo "\n\n\n"
	
sendnowself:
	@echo "*****************************"
	@echo "TEST SENDNOW SELF"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SendNowSelf $(DOMAIN)
	@echo "*****************************"
	@echo "TEST SENDNOW SELF successful"
	@echo "*****************************"
	@echo "\n\n\n"
	
sendnow:
	@echo "*****************************"
	@echo "TEST SENDNOW"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SendNow $(DOMAIN)
	@echo "*****************************"
	@echo "TEST SENDNOW successful"
	@echo "*****************************"
	@echo "\n\n\n"
	
nl:
	@echo "*****************************"
	@echo "TEST NEWLINE"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) NewLine -n 100000 $(DOMAIN)
	@echo "*****************************"
	@echo "TEST NEWLINE successful"
	@echo "*****************************"
	@echo "\n\n\n"

probe:
	@echo "*****************************"
	@echo "TEST PROBE < /dev/null"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) fr.dgac.ivy.tools.Probe  $(DOMAIN) < /dev/null
	@echo "*****************************"
	@echo "TEST PROBE SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"


api:
	@echo "*****************************"
	@echo "TEST API"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) TestApi $(DOMAIN)
	@echo "*****************************"
	@echo "TEST API SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"


async: 
	@echo "*****************************"
	@echo "TEST ASYNC"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) AsyncAPI -r -l 5 -d 1 -s 10 $(DOMAIN)
	@echo "*****************************"
	@echo "TEST ASYNC SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"

stop: 
	@echo "*****************************"
	@echo "TEST STOP"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) StopStart $(DOMAIN)
	@echo "*****************************"
	@echo "TEST STOP SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"

unitaires:
	@echo "*****************************"
	@echo "TEST UNITAIRE"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) Unitaire $(DOMAIN)
	@echo "*****************************"
	@echo "TEST UNITAIRE SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"

filter:
	@echo "*****************************"
	@echo "TEST FILTER MESSAGES"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) Filter $(DOMAIN)
	@echo "*****************************"
	@echo "TEST FILTER SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"

test1: $(OBJ)
	@echo "*****************************"
	@echo "TEST Bench"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) BenchLocal $(DOMAIN)
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) BenchLocal -d 100 $(DOMAIN)
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) BenchLocal -d 0 $(DOMAIN)
	@echo "*****************************"
	@echo "TEST Bench SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"

test2: $(OBJ)
	@echo "*****************************"
	@echo "TEST Bench 2"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) BenchLocal -t 2 -d 100 $(DOMAIN)
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) BenchLocal -t 2 -d 0 $(DOMAIN)
	@echo "*****************************"
	@echo "TEST Bench 2 SUCCESSFUL"
	@echo "*****************************"
	@echo "\n\n\n"

swing: $(OBJ)
	@echo "*****************************"
	@echo "TEST Swing "
	@echo "WARNING, this is manual, you have to use the GUI to test ..."
	@echo "TODO, add java.awt.Robot support"
	@echo "*****************************"
	$(JAVA) $(DEBUG) $(JAVAOPTS) $(CLASSPATH) SwingIvy $(DOMAIN)
	@echo "*****************************"
	@echo "TEST Swing Successful"
	@echo "*****************************"
	@echo "\n\n\n"

clean:
	/bin/rm -fR $(OBJ) *.class classes
	@mkdir classes