forked from I2P_Developers/i2p.i2p
Move streaming demo out of tests
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="test/junit"/>
|
||||
<classpathentry kind="src" path="demo"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="output" path="build/obj"/>
|
||||
|
@ -40,21 +40,21 @@
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="compileTest" depends="jar">
|
||||
<mkdir dir="./buildTest" />
|
||||
<mkdir dir="./buildTest/obj" />
|
||||
<target name="compileDemo" depends="jar">
|
||||
<mkdir dir="./buildDemo" />
|
||||
<mkdir dir="./buildDemo/obj" />
|
||||
<javac
|
||||
srcdir="./test/junit"
|
||||
srcdir="./demo"
|
||||
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
||||
includeAntRuntime="false"
|
||||
destdir="./buildTest/obj"
|
||||
destdir="./buildDemo/obj"
|
||||
classpath="../../../core/java/build/i2p.jar:./build/mstreaming.jar" >
|
||||
<compilerarg line="${javac.compilerargs}" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="jarTest" depends="jar, compileTest">
|
||||
<jar destfile="./build/mstreamingTest.jar" basedir="./buildTest/obj" includes="**/*.class" update="true" />
|
||||
<target name="jarDemo" depends="jar, compileDemo">
|
||||
<jar destfile="./build/mstreamingDemo.jar" basedir="./buildDemo/obj" includes="**/*.class" update="true" />
|
||||
</target>
|
||||
|
||||
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
|
||||
@ -140,7 +140,7 @@
|
||||
</target>
|
||||
<target name="clean">
|
||||
<delete dir="./build" />
|
||||
<delete dir="./buildTest" />
|
||||
<delete dir="./buildDemo" />
|
||||
</target>
|
||||
<target name="cleandep" depends="clean">
|
||||
</target>
|
||||
|
@ -1,14 +1,11 @@
|
||||
package net.i2p.client.streaming.impl;
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocketManagerFactory;
|
||||
import net.i2p.client.streaming.StreamSinkSend;
|
||||
import net.i2p.client.streaming.impl.I2PSocketManagerFull;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class StreamSinkTestClient {
|
||||
public static void main(String args[]) {
|
||||
System.setProperty(I2PSocketManagerFactory.PROP_MANAGER, I2PSocketManagerFull.class.getName());
|
||||
//System.setProperty(I2PClient.PROP_TCP_HOST, "dev.i2p.net");
|
||||
//System.setProperty(I2PClient.PROP_TCP_PORT, "4501");
|
||||
System.setProperty("tunnels.depthInbound", "0");
|
@ -1,14 +1,11 @@
|
||||
package net.i2p.client.streaming.impl;
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocketManagerFactory;
|
||||
import net.i2p.client.streaming.StreamSinkServer;
|
||||
import net.i2p.client.streaming.impl.I2PSocketManagerFull;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class StreamSinkTestServer {
|
||||
public static void main(String args[]) {
|
||||
System.setProperty(I2PSocketManagerFactory.PROP_MANAGER, I2PSocketManagerFull.class.getName());
|
||||
//System.setProperty(I2PClient.PROP_TCP_HOST, "dev.i2p.net");
|
||||
//System.setProperty(I2PClient.PROP_TCP_PORT, "4101");
|
||||
System.setProperty("tunnels.depthInbound", "0");
|
@ -1,10 +1,8 @@
|
||||
package net.i2p.client.streaming.impl;
|
||||
package net.i2p.client.streaming;
|
||||
|
||||
import net.i2p.client.streaming.I2PSocketManagerFactory;
|
||||
import net.i2p.client.streaming.StreamSinkClient;
|
||||
import net.i2p.client.streaming.StreamSinkSend;
|
||||
import net.i2p.client.streaming.StreamSinkServer;
|
||||
import net.i2p.client.streaming.impl.I2PSocketManagerFull;
|
||||
/**
|
||||
* Usage: StreamSinkTest [(old|new) [#hops [#kb]]]
|
||||
*/
|
||||
@ -26,30 +24,23 @@ public class StreamSinkTestStandalone {
|
||||
/* */
|
||||
|
||||
public static void main(String args[]) {
|
||||
boolean old = false;
|
||||
int hops = 0;
|
||||
int kb = 32*1024;
|
||||
if (args.length > 0) {
|
||||
if ("old".equals(args[0]))
|
||||
old = true;
|
||||
}
|
||||
if (args.length > 1) {
|
||||
try {
|
||||
hops = Integer.parseInt(args[1]);
|
||||
hops = Integer.parseInt(args[0]);
|
||||
} catch (NumberFormatException nfe) {
|
||||
hops = 0;
|
||||
}
|
||||
}
|
||||
if (args.length > 2) {
|
||||
if (args.length > 1) {
|
||||
try {
|
||||
kb = Integer.parseInt(args[2]);
|
||||
kb = Integer.parseInt(args[1]);
|
||||
} catch (NumberFormatException nfe) {
|
||||
kb = 32*1024;
|
||||
}
|
||||
}
|
||||
|
||||
if (!old)
|
||||
System.setProperty(I2PSocketManagerFactory.PROP_MANAGER, I2PSocketManagerFull.class.getName());
|
||||
System.setProperty("tunnels.depthInbound", ""+hops);
|
||||
|
||||
new Thread(new Runnable() {
|
@ -39,7 +39,7 @@
|
||||
</target>
|
||||
<target name="builddeptest">
|
||||
<ant dir="../../../core/java" target="jar" />
|
||||
<ant dir="../../../apps/ministreaming/java/" target="jarTest" />
|
||||
<ant dir="../../../apps/ministreaming/java/" target="jar" />
|
||||
</target>
|
||||
<target name="junit.compileTest" depends="builddeptest, compile">
|
||||
|
||||
@ -61,7 +61,6 @@
|
||||
<classpath>
|
||||
<pathelement location="../../../core/java/build/i2p.jar" />
|
||||
<pathelement location="../../ministreaming/java/build/mstreaming.jar" />
|
||||
<pathelement location="../../ministreaming/java/build/mstreamingTest.jar" />
|
||||
<pathelement location="${junit.home}/junit4.jar" />
|
||||
<pathelement location="${hamcrest.home}/hamcrest.jar" />
|
||||
<pathelement location="${hamcrest.home}/hamcrest-all.jar" />
|
||||
@ -120,7 +119,6 @@
|
||||
<pathelement location="../../../core/java/build/i2ptest.jar" />
|
||||
<pathelement location="../../../core/java/build/i2p.jar" />
|
||||
<pathelement location="../../ministreaming/java/build/mstreaming.jar" />
|
||||
<pathelement location="../../ministreaming/java/build/mstreamingTest.jar" />
|
||||
<pathelement location="../../build/jbigi.jar" />
|
||||
<pathelement location="${with.clover}" />
|
||||
<pathelement location="${with.cobertura}" />
|
||||
|
Reference in New Issue
Block a user