Tests: Use Perl prove as the testsuite runner
authorChristian Babeux <christian.babeux@efficios.com>
Thu, 21 Mar 2013 19:56:45 +0000 (15:56 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 25 Mar 2013 14:07:00 +0000 (10:07 -0400)
Currently the regression and unit testsuites are runned via a custom
runner script. By using the Perl prove utility, we can run the
testsuites and also gain additionnal features such as: parallel jobs,
separate testlists, etc.

This commit modify the make check target to run Perl prove as the
testsuite runner.

Testlist:

tests/unit_tests      : unit tests.
tests/fast_regression : a fast regression testsuite.
tests/long_regression : a long regression testsuite (includes slow tests such
                        as test_low_throughput and others).
tests/root_regression : a testsuite for tests that need root access
        (mostly tests using lttng-modules and bandwith limits).

Running a testsuite:

$ cd lttng-tools/tests
$ ./run.sh <testsuite>

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: David Goulet <dgoulet@efficios.com>
.gitignore
tests/Makefile.am
tests/fast_regression [new file with mode: 0644]
tests/long_regression [new file with mode: 0644]
tests/root_regression [new file with mode: 0644]
tests/run.sh
tests/unit_tests [new file with mode: 0644]

index ac72bf4fe9e92b2c78956b6bfac1842abc2dfdd3..ee5825207ff5132f3c9b28aee2f1a5f928cab0e7 100644 (file)
@@ -62,7 +62,6 @@ gen-nevents
 gen-events-time
 gen-events
 gen-ust-events
-unit_tests
 health_check
 tests/regression/ust/overlap/demo/demo
 
index b75de49591fb6971e99d22672eafde6e7d16bf73..a95afa73e16dac810878f8aad28d10f78c96112a 100644 (file)
@@ -1,4 +1,5 @@
 SUBDIRS = utils regression unit
 
 check-am:
-       ./run.sh
+       ./run.sh unit_tests
+       ./run.sh fast_regression
diff --git a/tests/fast_regression b/tests/fast_regression
new file mode 100644 (file)
index 0000000..fb4ac60
--- /dev/null
@@ -0,0 +1,14 @@
+regression/tools/filtering/test_invalid_filter
+regression/tools/filtering/test_unsupported_op
+regression/tools/filtering/test_valid_filter
+regression/tools/health/test_thread_exit
+regression/tools/health/test_thread_stall
+regression/tools/health/test_tp_fail
+regression/tools/streaming/test_ust
+regression/ust/before-after/test_before_after
+regression/ust/buffers-uid/test_buffers_uid
+regression/ust/multi-session/test_multi_session
+regression/ust/nprocesses/test_nprocesses
+regression/ust/overlap/test_overlap
+regression/ust/test_event_basic
+regression/ust/test_event_wildcard
diff --git a/tests/long_regression b/tests/long_regression
new file mode 100644 (file)
index 0000000..8bae843
--- /dev/null
@@ -0,0 +1,16 @@
+regression/tools/filtering/test_invalid_filter
+regression/tools/filtering/test_unsupported_op
+regression/tools/filtering/test_valid_filter
+regression/tools/health/test_thread_exit
+regression/tools/health/test_thread_stall
+regression/tools/health/test_tp_fail
+regression/tools/streaming/test_ust
+regression/ust/before-after/test_before_after
+regression/ust/buffers-uid/test_buffers_uid
+regression/ust/high-throughput/test_high_throughput
+regression/ust/low-throughput/test_lo_throughput
+regression/ust/multi-session/test_multi_session
+regression/ust/nprocesses/test_nprocesses
+regression/ust/overlap/test_overlap
+regression/ust/test_event_basic
+regression/ust/test_event_wildcard
diff --git a/tests/root_regression b/tests/root_regression
new file mode 100644 (file)
index 0000000..2ae884d
--- /dev/null
@@ -0,0 +1,4 @@
+regression/kernel/test_all_events
+regression/kernel/test_event_basic
+regression/tools/streaming/test_high_throughput_limits
+regression/tools/streaming/test_kernel
index d63c72b9be7aada31f652c7f0fa2e175b2e127a8..c6c50fd9cff94ecb02ef1e9b3eab2e98180043c6 100755 (executable)
@@ -16,7 +16,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
-DIR=$(dirname $0)
 
-$DIR/regression/run.sh $@
-$DIR/unit/run.sh $@
+[ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
+
+prove --merge --exec '' - < $1
diff --git a/tests/unit_tests b/tests/unit_tests
new file mode 100644 (file)
index 0000000..d7c68b6
--- /dev/null
@@ -0,0 +1,4 @@
+unit/test_kernel_data
+unit/test_session
+unit/test_uri
+unit/test_ust_data
This page took 0.028055 seconds and 4 git commands to generate.