aboutsummaryrefslogtreecommitdiffstats
path: root/dtube/test_dtube.sh
diff options
context:
space:
mode:
authorLaurent Ghigonis <laurent@p1sec.com>2013-02-28 12:41:07 +0100
committerLaurent Ghigonis <laurent@p1sec.com>2013-02-28 12:41:07 +0100
commit30dca79576e6eaac39f4d5082b54d6332bfa12df (patch)
tree56b7f7ba7283f6b391e9d0e0df21d372e29b0fd0 /dtube/test_dtube.sh
parentdtube: fix bug if no country in IPrange of AS (diff)
downloadlaurent-tools-30dca79576e6eaac39f4d5082b54d6332bfa12df.tar.xz
laurent-tools-30dca79576e6eaac39f4d5082b54d6332bfa12df.zip
dtube: remove unittests and create external script to test dtube
Diffstat (limited to '')
-rwxr-xr-xdtube/test_dtube.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/dtube/test_dtube.sh b/dtube/test_dtube.sh
new file mode 100755
index 0000000..396a04b
--- /dev/null
+++ b/dtube/test_dtube.sh
@@ -0,0 +1,18 @@
+#test_target="AS23118 91.220.156.0/24 208.67.222.222 ovh.net US"
+test_target="AS23118 91.220.156.0/24 208.67.222.222"
+
+err() {
+ echo "ERROR while executing $1"
+ exit 1
+}
+
+mkdir -p "tests_output" ||exit
+
+for t in $test_target; do
+ tp=`echo $t |tr '/' '-'`
+ cmd="./dtube.py $t"
+ echo $cmd
+ ./dtube.py $t > "tests_output/$tp" ||err $cmd $t
+done
+
+echo "All tests OK"