aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/BenchLocal.java3
-rw-r--r--tests/Makefile37
-rw-r--r--tests/NewLine.java2
-rw-r--r--tests/TestNet.java1
-rw-r--r--tests/TestNetSwing.java1
5 files changed, 21 insertions, 23 deletions
diff --git a/tests/BenchLocal.java b/tests/BenchLocal.java
index 6a21599..6c11360 100644
--- a/tests/BenchLocal.java
+++ b/tests/BenchLocal.java
@@ -19,7 +19,6 @@
*/
import gnu.getopt.*;
import fr.dgac.ivy.*;
-import java.io.*;
class BenchLocal {
@@ -173,7 +172,7 @@ class BenchLocal {
Ivy b;
public DIE(Ivy b) {this.b=b; }
public void receive(IvyClient client,String[] arg) {
- log("received out message");
+ log("received out message, b="+b);
b.stop(); // I leave the bus
}
}
diff --git a/tests/Makefile b/tests/Makefile
index 4e13679..b13ed56 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,17 +1,22 @@
# 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
+include ../java.mk # in this file you can change your java compiler and VM
IVYPATH=../lib/ivy-java.jar
CLASSPATH=-classpath classes:$(IVYPATH)
-
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=$(MULTICAST)
+#LOCALNET=192.168.19:3456
+LOCALNET=
MULTICAST=228.1.2.3:4567
+DOMAIN=
+#DOMAIN=-b $(MULTICAST)
all:
@@ -21,36 +26,34 @@ all:
run: nl api unitaires test1 test2 probe async stop request
request:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) Request
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) Request $(DOMAIN)
nl:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) NewLine -n 100000
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) NewLine -n 100000 $(DOMAIN)
probe:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) fr.dgac.ivy.Probe < /dev/null
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) fr.dgac.ivy.Probe $(DOMAIN) < /dev/null
api:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) TestApi
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) TestApi $(DOMAIN)
async:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) AsyncAPI -r -l 5 -d 1 -s 10
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) AsyncAPI -r -l 5 -d 1 -s 10 $(DOMAIN)
stop:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) StopStart
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) StopStart $(DOMAIN)
unitaires:
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) fr.dgac.ivy.Ivy
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) fr.dgac.ivy.Ivy $(DOMAIN)
test1: $(OBJ)
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -b $(LOCALNET)
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -b $(MULTICAST)
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -d 100
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -d 0
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal $(DOMAIN)
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -d 100 $(DOMAIN)
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -d 0 $(DOMAIN)
test2: $(OBJ)
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -t 2 -d 100
- $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -t 2 -d 0
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -t 2 -d 100 $(DOMAIN)
+ $(JAVA) $(JAVAOPTS) $(CLASSPATH) BenchLocal -t 2 -d 0 $(DOMAIN)
clean:
/bin/rm -fR $(OBJ) *.class classes
diff --git a/tests/NewLine.java b/tests/NewLine.java
index ac4dc43..5517a54 100644
--- a/tests/NewLine.java
+++ b/tests/NewLine.java
@@ -58,9 +58,7 @@ class NewLine {
for (int i=0;i<n;i++ ) bus.sendMsg("coucou monde");
t3=(new java.util.Date()).getTime();
System.out.println("with protection " + (t2-t1) +"ms, without "+(t3-t2)+"ms");
- System.out.println("DEBUUUUUUG stopping the bus");
bus.stop();
- System.out.println("DEBUUUUUUG end stopping the bus");
}
}
diff --git a/tests/TestNet.java b/tests/TestNet.java
index d1ff968..56c0b17 100644
--- a/tests/TestNet.java
+++ b/tests/TestNet.java
@@ -14,7 +14,6 @@
import java.lang.Thread;
import java.net.*;
import java.io.*;
-import java.util.StringTokenizer;
import org.apache.regexp.*;
import gnu.getopt.*;
diff --git a/tests/TestNetSwing.java b/tests/TestNetSwing.java
index 7afbb0a..f2dc0eb 100644
--- a/tests/TestNetSwing.java
+++ b/tests/TestNetSwing.java
@@ -11,7 +11,6 @@
*/
import java.net.*;
import java.io.*;
-import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;