From: Christian Babeux Date: Thu, 22 Aug 2013 17:02:31 +0000 (-0400) Subject: Tests: Use Perl prove as the testsuite runner X-Git-Tag: v1.2.0-rc1~74^2~5 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=f094cdcc4daa759ed92e3dc92203f02a22c14092;hp=19badea8d8be993ad0eb807093ad3a26e027889a Tests: Use Perl prove as the testsuite runner 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/Makefile.am b/tests/Makefile.am index b03b7e0a..c0ea34e6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -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 index 00000000..c6c50fd9 --- /dev/null +++ b/tests/run.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Copyright (C) 2013 - Christian Babeux +# +# 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 index 00000000..10efa4b0 --- /dev/null +++ b/tests/tests @@ -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