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

[tor-commits] [torsocks/master] Add tests to make check



commit 4c86527778f1a774192b0dd589479535914f6b34
Author: David Goulet <dgoulet@xxxxxxxxx>
Date:   Sat Aug 24 13:57:06 2013 -0400

    Add tests to make check
    
    Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
 tests/Makefile.am |    6 ++++++
 tests/run.sh      |   21 +++++++++++++++++++++
 tests/test_list   |    1 +
 3 files changed, 28 insertions(+)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index e0a3fba..66f3dde 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -10,3 +10,9 @@ noinst_PROGRAMS = test_dns
 
 test_dns_SOURCES = test_dns.c
 test_dns_LDADD = $(LIBTAP) $(LIBTORSOCKS)
+
+check-am:
+	./run.sh test_list
+
+dist_noinst_SCRIPTS = test_list run.sh
+EXTRA_DIST = run.sh test_list
diff --git a/tests/run.sh b/tests/run.sh
new file mode 100755
index 0000000..07d446f
--- /dev/null
+++ b/tests/run.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# Copyright (C) 2013 - Christian Babeux <christian.babeux@xxxxxxxxxxxx>
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free Software
+# Foundation; only version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+# details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+# Place - Suite 330, Boston, MA  02111-1307, USA.
+#
+
+[ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
+
+prove --merge --exec '' - < $1
diff --git a/tests/test_list b/tests/test_list
new file mode 100644
index 0000000..963e59b
--- /dev/null
+++ b/tests/test_list
@@ -0,0 +1 @@
+./test_dns



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