Tests: Use Perl prove as the testsuite runner
authorChristian Babeux <christian.babeux@efficios.com>
Thu, 22 Aug 2013 17:02:31 +0000 (13:02 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Aug 2013 17:08:39 +0000 (13:08 -0400)
This commit modify the make check target to run Perl prove as the
testsuite runner.

$ cd babeltrace/tests
$ ./run.sh tests

One can also run tests manually using prove:

$ prove --exec '' path/to/test

    OR

$ prove --exec '' - < testlist

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/Makefile.am
tests/run.sh [new file with mode: 0755]
tests/tests [new file with mode: 0644]

index b03b7e0aa1d9ce46345e4fe8c1ea0e42ce0413ca..c0ea34e66a90847341e34bffccaef50fb707658d 100644 (file)
@@ -1,3 +1,6 @@
 SUBDIRS = utils bin lib
 
 EXTRA_DIST = ctf-traces/**
+
+check-am:
+       ./run.sh tests
diff --git a/tests/run.sh b/tests/run.sh
new file mode 100755 (executable)
index 0000000..c6c50fd
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# Copyright (C) 2013 - Christian Babeux <christian.babeux@efficios.com>
+#
+# 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/tests b/tests/tests
new file mode 100644 (file)
index 0000000..10efa4b
--- /dev/null
@@ -0,0 +1,4 @@
+bin/test_trace_read
+lib/test_bitfield
+lib/test_seek_empty_packet
+lib/test_seek_big_trace
\ No newline at end of file
This page took 0.025036 seconds and 4 git commands to generate.