[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] * The Makefile is a quick and dirty way to run all the tests simultaneously,



commit 1e5d1aeea8115f5d0b8c04c2308ef001a3538481
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Thu Nov 1 12:10:18 2012 +0000

    * The Makefile is a quick and dirty way to run all the tests simultaneously,
      to check that your haxorzingz haven't fubar'd all of the things.
    * That Makefile still needs more tests added to it.
    * There is a short INSTRUCTIONS file in /bin so that people don't do
      that thing where they are like, "uh...i don't know which greenword
      thing to run."
---
 bin/INSTRUCTIONS |   15 +++++++++++++++
 bin/Makefile     |   42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/bin/INSTRUCTIONS b/bin/INSTRUCTIONS
new file mode 100644
index 0000000..a624ae7
--- /dev/null
+++ b/bin/INSTRUCTIONS
@@ -0,0 +1,15 @@
+That Makefile is for testing that the tests work. However, not
+all of the tests have a line in the Makefile yet. If you would
+like to add things to it, feel free to. Or even to write OONI
+unittests for realsies.
+
+The 'old_ooniprobe' script used to call the old script for
+starting up tests, ooni/ooniprobe.py, but I have just removed
+ooniprobe.py and kept the remaining useful pieces in
+ooni/utils/legacy.py where the rest of the new API for running
+old code lives. I think they are happier if we keep them together.
+
+tl;dr: the thing you actually want to use is the script called
+       'ooniprobe'.
+
+ --isis
diff --git a/bin/Makefile b/bin/Makefile
new file mode 100644
index 0000000..039f596
--- /dev/null
+++ b/bin/Makefile
@@ -0,0 +1,42 @@
+#########################################################
+# This janky Makefile is Isis' halfassed solution for   #
+#    a "one-click" zomg-are-we-there-yet oracle.        #
+#                                                       #
+#     Obviously, you just do '$ make all'. <(A)3        #
+#########################################################
+
+#
+#  you'll also need a file of things to test things on.
+#  for all of the things.
+#
+
+## all tests, without debugging
+## ----------------------------
+all: echot simplet captivet dnst httphostt squidt
+
+## all tests, with debugging
+## -------------------------
+## note: you will be doing "n-Ret-n-Ret-n-Ret-s-Ret-n-Ret..."
+##       for a *REALLY* long time
+all_debug: echod simpled captived dnsd httphostd squidd
+
+simplet:
+	../bin/ooniprobe ../nettests/simpletest.py -a ../ooni/assets/hostnames.txt
+
+simpled:
+	python -m pdb ../bin/ooniprobe ../nettests/simpletest.py -a ../ooni/assets/hostnames.txt
+
+echot:
+	../bin/ooniprobe ../ooni/echo.py -f ../ooni/assets/hostnames.txt
+
+echod:
+	python -m pdb ../bin/ooniprobe ../ooni/echo.py -f ../ooni/assets/hostnames.txt
+
+captivet:
+	../bin/ooniprobe ../nettests/core/captiveportal.py -f ../ooni/assets/hostnames.txt
+
+captived:
+	python -m pdb ../bin/ooniprobe --spew ../nettests/core/captiveportal.py -f ../ooni/assets/hostnames.txt
+
+mvreports:
+	for $report in `find ../ -name "report*"`; do mv $report test-results ; done

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits