[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/release] Move new module to proper place(s) in the source tree.
commit ede6be2e5c29d896ff962608697a39b0780ec32e
Author: iwakeh <iwakeh@xxxxxxxxxxxxxx>
Date: Wed Dec 20 13:06:47 2017 +0000
Move new module to proper place(s) in the source tree.
This includes moving the Java and Sql sources as well as test sources,
and adaption of paths in test classes. Created an ant task 'ipv6server'
and added its call to run-web-prepare target.
---
build.xml | 9 +++++++++
modules/ipv6servers/.gitignore | 3 ---
modules/ipv6servers/build.xml | 21 ---------------------
shared/bin/20-run-ipv6servers-stats.sh | 5 -----
.../metrics/stats/ipv6servers/Configuration.java | 0
.../metrics/stats/ipv6servers/Database.java | 0
.../torproject/metrics/stats/ipv6servers/Main.java | 0
.../metrics/stats/ipv6servers/OutputLine.java | 0
.../stats/ipv6servers/ParsedNetworkStatus.java | 0
.../stats/ipv6servers/ParsedServerDescriptor.java | 0
.../metrics/stats/ipv6servers/Parser.java | 0
.../metrics/stats/ipv6servers/Writer.java | 0
.../main/sql/ipv6servers}/init-ipv6servers.sql | 0
.../stats/ipv6servers/ParsedNetworkStatusTest.java | 4 ++--
.../ipv6servers/ParsedServerDescriptorTest.java | 12 ++++++------
.../000a7fe20a17bf5d9839a126b1dff43f998aac6f | 0
.../0018ab4f2f28af683d52f06407edbf7ce1bd3b7d | 0
.../0041dbf9fe846f9765882f7dc8332f94b709e35a | 0
.../01003df74972ce952ebfa390f468ef63c50efa25 | 0
.../018c1229d5f56eebfc1d709d4692673d098800e8 | 0
.../ipv6servers}/2017-12-04-20-00-00-consensus.part | 0
...07-1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1.part | 0
.../64dd486d89af14027c9a7b4347a94b74dddb5cdb | 0
.../test/sql/ipv6servers}/test-ipv6servers.sql | 0
24 files changed, 17 insertions(+), 37 deletions(-)
diff --git a/build.xml b/build.xml
index 6fee387..c884cc6 100644
--- a/build.xml
+++ b/build.xml
@@ -195,6 +195,7 @@
<antcall target="advbwdist" />
<antcall target="hidserv" />
<antcall target="clients" />
+ <antcall target="ipv6servers" />
<antcall target="webstats" />
<antcall target="make-data-available" />
</target>
@@ -331,6 +332,14 @@
</antcall>
</target>
+ <target name="ipv6servers" >
+ <property name="module.name" value="ipv6servers" />
+ <antcall target="run-java" >
+ <param name="module.main"
+ value="org.torproject.metrics.stats.ipv6servers.Main" />
+ </antcall>
+ </target>
+
<target name="webstats" >
<property name="module.name" value="webstats" />
<property name="rdatadir" value="${modulebase}/${module.name}/RData" />
diff --git a/modules/ipv6servers/.gitignore b/modules/ipv6servers/.gitignore
deleted file mode 100644
index c8e90bb..0000000
--- a/modules/ipv6servers/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/stats/
-/status/
-
diff --git a/modules/ipv6servers/build.xml b/modules/ipv6servers/build.xml
deleted file mode 100644
index 736b579..0000000
--- a/modules/ipv6servers/build.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<project default="run" name="ipv6servers" basedir=".">
-
- <property name="mainclass"
- value="org.torproject.metrics.stats.ipv6servers.Main" />
-
- <include file="../../shared/build-base.xml" as="basetask"/>
- <target name="clean" depends="basetask.clean"/>
- <target name="compile" depends="basetask.compile"/>
- <target name="test" depends="basetask.test"/>
- <target name="run" depends="basetask.run"/>
-
- <path id="classpath">
- <pathelement path="${classes}"/>
- <path refid="base.classpath" />
- <fileset dir="${libs}">
- <include name="postgresql-jdbc3-9.2.jar"/>
- </fileset>
- </path>
-
-</project>
-
diff --git a/shared/bin/20-run-ipv6servers-stats.sh b/shared/bin/20-run-ipv6servers-stats.sh
deleted file mode 100755
index 5d7bd13..0000000
--- a/shared/bin/20-run-ipv6servers-stats.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-cd modules/ipv6servers/
-ant run | grep "\[java\]"
-cd ../../
-
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Configuration.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/Configuration.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Configuration.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/Configuration.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Database.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/Database.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Database.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/Database.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Main.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/Main.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Main.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/Main.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/OutputLine.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/OutputLine.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/OutputLine.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/OutputLine.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatus.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatus.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatus.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatus.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptor.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptor.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptor.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptor.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/Parser.java
diff --git a/modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Writer.java b/src/main/java/org/torproject/metrics/stats/ipv6servers/Writer.java
similarity index 100%
rename from modules/ipv6servers/src/main/java/org/torproject/metrics/stats/ipv6servers/Writer.java
rename to src/main/java/org/torproject/metrics/stats/ipv6servers/Writer.java
diff --git a/modules/ipv6servers/src/main/resources/init-ipv6servers.sql b/src/main/sql/ipv6servers/init-ipv6servers.sql
similarity index 100%
rename from modules/ipv6servers/src/main/resources/init-ipv6servers.sql
rename to src/main/sql/ipv6servers/init-ipv6servers.sql
diff --git a/modules/ipv6servers/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatusTest.java b/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatusTest.java
similarity index 97%
rename from modules/ipv6servers/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatusTest.java
rename to src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatusTest.java
index 4b07154..c2642b8 100644
--- a/modules/ipv6servers/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatusTest.java
+++ b/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedNetworkStatusTest.java
@@ -33,8 +33,8 @@ public class ParsedNetworkStatusTest {
/** Provide test data. */
@Parameters
public static Collection<Object[]> data() {
- String relayFileName = "descriptors/2017-12-04-20-00-00-consensus.part";
- String bridgeFileName = "descriptors/"
+ String relayFileName = "ipv6servers/2017-12-04-20-00-00-consensus.part";
+ String bridgeFileName = "ipv6servers/"
+ "20171204-190507-1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1.part";
return Arrays.asList(new Object[][] {
{ "Relay status without Guard or Exit flag and without IPv6 address. ",
diff --git a/modules/ipv6servers/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptorTest.java b/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptorTest.java
similarity index 88%
rename from modules/ipv6servers/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptorTest.java
rename to src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptorTest.java
index 5079031..baff31b 100644
--- a/modules/ipv6servers/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptorTest.java
+++ b/src/test/java/org/torproject/metrics/stats/ipv6servers/ParsedServerDescriptorTest.java
@@ -32,22 +32,22 @@ public class ParsedServerDescriptorTest {
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] {
{ "Relay server descriptor without or-address or ipv6-policy line.",
- "descriptors/0018ab4f2f28af683d52f06407edbf7ce1bd3b7d",
+ "ipv6servers/0018ab4f2f28af683d52f06407edbf7ce1bd3b7d",
819200, false, false },
{ "Relay server descriptor with or-address and ipv6-policy line.",
- "descriptors/01003df74972ce952ebfa390f468ef63c50efa25",
+ "ipv6servers/01003df74972ce952ebfa390f468ef63c50efa25",
6576128, true, true },
{ "Relay server descriptor with or-address line only.",
- "descriptors/018c1229d5f56eebfc1d709d4692673d098800e8",
+ "ipv6servers/018c1229d5f56eebfc1d709d4692673d098800e8",
0, true, false },
{ "Bridge server descriptor without or-address or ipv6-policy line.",
- "descriptors/000a7fe20a17bf5d9839a126b1dff43f998aac6f",
+ "ipv6servers/000a7fe20a17bf5d9839a126b1dff43f998aac6f",
0, false, false },
{ "Bridge server descriptor with or-address line.",
- "descriptors/0041dbf9fe846f9765882f7dc8332f94b709e35a",
+ "ipv6servers/0041dbf9fe846f9765882f7dc8332f94b709e35a",
0, true, false },
{ "Bridge server descriptor with (ignored) ipv6-policy accept line.",
- "descriptors/64dd486d89af14027c9a7b4347a94b74dddb5cdb",
+ "ipv6servers/64dd486d89af14027c9a7b4347a94b74dddb5cdb",
0, false, false }
});
}
diff --git a/modules/ipv6servers/src/test/resources/descriptors/000a7fe20a17bf5d9839a126b1dff43f998aac6f b/src/test/resources/ipv6servers/000a7fe20a17bf5d9839a126b1dff43f998aac6f
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/000a7fe20a17bf5d9839a126b1dff43f998aac6f
rename to src/test/resources/ipv6servers/000a7fe20a17bf5d9839a126b1dff43f998aac6f
diff --git a/modules/ipv6servers/src/test/resources/descriptors/0018ab4f2f28af683d52f06407edbf7ce1bd3b7d b/src/test/resources/ipv6servers/0018ab4f2f28af683d52f06407edbf7ce1bd3b7d
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/0018ab4f2f28af683d52f06407edbf7ce1bd3b7d
rename to src/test/resources/ipv6servers/0018ab4f2f28af683d52f06407edbf7ce1bd3b7d
diff --git a/modules/ipv6servers/src/test/resources/descriptors/0041dbf9fe846f9765882f7dc8332f94b709e35a b/src/test/resources/ipv6servers/0041dbf9fe846f9765882f7dc8332f94b709e35a
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/0041dbf9fe846f9765882f7dc8332f94b709e35a
rename to src/test/resources/ipv6servers/0041dbf9fe846f9765882f7dc8332f94b709e35a
diff --git a/modules/ipv6servers/src/test/resources/descriptors/01003df74972ce952ebfa390f468ef63c50efa25 b/src/test/resources/ipv6servers/01003df74972ce952ebfa390f468ef63c50efa25
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/01003df74972ce952ebfa390f468ef63c50efa25
rename to src/test/resources/ipv6servers/01003df74972ce952ebfa390f468ef63c50efa25
diff --git a/modules/ipv6servers/src/test/resources/descriptors/018c1229d5f56eebfc1d709d4692673d098800e8 b/src/test/resources/ipv6servers/018c1229d5f56eebfc1d709d4692673d098800e8
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/018c1229d5f56eebfc1d709d4692673d098800e8
rename to src/test/resources/ipv6servers/018c1229d5f56eebfc1d709d4692673d098800e8
diff --git a/modules/ipv6servers/src/test/resources/descriptors/2017-12-04-20-00-00-consensus.part b/src/test/resources/ipv6servers/2017-12-04-20-00-00-consensus.part
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/2017-12-04-20-00-00-consensus.part
rename to src/test/resources/ipv6servers/2017-12-04-20-00-00-consensus.part
diff --git a/modules/ipv6servers/src/test/resources/descriptors/20171204-190507-1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1.part b/src/test/resources/ipv6servers/20171204-190507-1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1.part
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/20171204-190507-1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1.part
rename to src/test/resources/ipv6servers/20171204-190507-1D8F3A91C37C5D1C4C19B1AD1D0CFBE8BF72D8E1.part
diff --git a/modules/ipv6servers/src/test/resources/descriptors/64dd486d89af14027c9a7b4347a94b74dddb5cdb b/src/test/resources/ipv6servers/64dd486d89af14027c9a7b4347a94b74dddb5cdb
similarity index 100%
rename from modules/ipv6servers/src/test/resources/descriptors/64dd486d89af14027c9a7b4347a94b74dddb5cdb
rename to src/test/resources/ipv6servers/64dd486d89af14027c9a7b4347a94b74dddb5cdb
diff --git a/modules/ipv6servers/src/test/sql/test-ipv6servers.sql b/src/test/sql/ipv6servers/test-ipv6servers.sql
similarity index 100%
rename from modules/ipv6servers/src/test/sql/test-ipv6servers.sql
rename to src/test/sql/ipv6servers/test-ipv6servers.sql
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits