From 6ca1931cb32ca2eb33252896d2a42a4c48af436a Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Fri, 5 May 2017 16:45:11 -0400 Subject: [PATCH] tests: put TESTS list in each Makefile.am MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit So that you can do `make check` in any subdirectory to run only those tests. Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- tests/Makefile.am | 36 --------------------------- tests/bin/Makefile.am | 13 ++++++++++ tests/bindings/python/bt2/Makefile.am | 7 ++++++ tests/lib/Makefile.am | 28 ++++++++++++++++++++- tests/lib/writer/Makefile.am | 13 +++------- tests/plugins/Makefile.am | 5 ++++ 6 files changed, 56 insertions(+), 46 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 0d0c2ebc..6df77579 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,41 +1,5 @@ SUBDIRS = utils bin lib bindings plugins -LOG_DRIVER_FLAGS='--merge' -LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ - $(top_srcdir)/config/tap-driver.sh - -TESTS = bin/test_trace_read \ - bin/test_trace_read \ - bin/test_packet_seq_num \ - bin/test_convert_args \ - bin/intersection/test_intersection \ - lib/test_bitfield \ - lib/test_seek_empty_packet \ - lib/test_seek_big_trace \ - lib/test_ctf_writer_complete \ - lib/test_bt_values \ - lib/test_ctf_ir_ref \ - lib/test_bt_ctf_field_type_validation \ - lib/test_ir_visit \ - lib/test_bt_notification_heap \ - lib/test_plugin_complete \ - lib/test_graph_topo \ - lib/test_cc_prio_map \ - lib/test_bt_notification_iterator \ - plugins/test-utils-muxer - EXTRA_DIST = $(srcdir)/ctf-traces/** \ $(srcdir)/debug-info-data/** \ $(srcdir)/debug-info-data/.build-id/cd/** - -if ENABLE_DEBUG_INFO -TESTS += lib/test_dwarf_complete \ - lib/test_bin_info_complete -endif - -if USE_PYTHON -TESTS += bin/intersection/test_multi_trace_intersection.py \ - lib/writer/test_ctf_writer_no_packet_context.py \ - lib/writer/test_ctf_writer_empty_packet.py \ - bindings/python/bt2/testall.sh -endif diff --git a/tests/bin/Makefile.am b/tests/bin/Makefile.am index dc603904..97d8eeba 100644 --- a/tests/bin/Makefile.am +++ b/tests/bin/Makefile.am @@ -1,2 +1,15 @@ SUBDIRS = intersection check_SCRIPTS = test_trace_read test_packet_seq_num test_convert_args + +LOG_DRIVER_FLAGS='--merge' +LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/config/tap-driver.sh + +TESTS = test_trace_read \ + test_trace_read \ + test_packet_seq_num \ + test_convert_args \ + intersection/test_intersection + +if USE_PYTHON +TESTS += intersection/test_multi_trace_intersection.py +endif diff --git a/tests/bindings/python/bt2/Makefile.am b/tests/bindings/python/bt2/Makefile.am index 78893fd7..e540afc6 100644 --- a/tests/bindings/python/bt2/Makefile.am +++ b/tests/bindings/python/bt2/Makefile.am @@ -13,3 +13,10 @@ EXTRA_DIST = \ test_trace.py \ test_values.py \ .coveragerc + +LOG_DRIVER_FLAGS='--merge' +LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/config/tap-driver.sh + +if USE_PYTHON +TESTS = testall.sh +endif diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index 060ff29d..c9219b8a 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -36,7 +36,7 @@ test_cc_prio_map_LDADD = $(COMMON_TEST_LDADD) test_bt_notification_iterator_LDADD = $(COMMON_TEST_LDADD) -noinst_PROGRAMS = test_bitfield test_ctf_writer test_bt_values \ +check_PROGRAMS = test_bitfield test_ctf_writer test_bt_values \ test_ctf_ir_ref test_bt_ctf_field_type_validation test_ir_visit \ test_bt_notification_heap test_plugin test_graph_topo \ test_cc_prio_map test_bt_notification_iterator @@ -73,3 +73,29 @@ check_SCRIPTS = test_ctf_writer_complete \ #noinst_PROGRAMS += test_dwarf test_bin_info #check_SCRIPTS += test_dwarf_complete test_bin_info_complete #endif + +LOG_DRIVER_FLAGS='--merge' +LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/config/tap-driver.sh + +TESTS = test_bitfield \ + test_ctf_writer_complete \ + test_bt_values \ + test_ctf_ir_ref \ + test_bt_ctf_field_type_validation \ + test_ir_visit \ + test_bt_notification_heap \ + test_plugin_complete \ + test_graph_topo \ + test_cc_prio_map \ + test_bt_notification_iterator + +if ENABLE_DEBUG_INFO +TESTS += test_dwarf_complete \ + test_bin_info_complete +endif + +if USE_PYTHON +TESTS += + writer/test_ctf_writer_no_packet_context.py \ + writer/test_ctf_writer_empty_packet.py +endif diff --git a/tests/lib/writer/Makefile.am b/tests/lib/writer/Makefile.am index eb648367..07314879 100644 --- a/tests/lib/writer/Makefile.am +++ b/tests/lib/writer/Makefile.am @@ -1,21 +1,16 @@ -TESTS = test_ctf_writer_no_packet_context.py \ - test_ctf_writer_empty_packet.py - -check_SCRIPTS = $(TESTS) - -dist_noinst_SCRIPTS = $(TESTS) -EXTRA_DIST = $(TESTS) +check_SCRIPTS = test_ctf_writer_no_packet_context.py \ + test_ctf_writer_empty_packet.py all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(EXTRA_DIST); do \ + for script in $(check_SCRIPTS); do \ cp -f $(srcdir)/$$script $(builddir); \ done; \ fi clean-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(EXTRA_DIST); do \ + for script in $(check_SCRIPTS); do \ rm -f $(builddir)/$$script; \ done; \ fi diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am index 98becefe..b2fd059b 100644 --- a/tests/plugins/Makefile.am +++ b/tests/plugins/Makefile.am @@ -9,3 +9,8 @@ test_utils_muxer_SOURCES = test-utils-muxer.c test_utils_muxer_LDADD = $(COMMON_TEST_LDADD) check_SCRIPTS = test-utils-muxer-complete + +LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/config/tap-driver.sh +LOG_DRIVER_FLAGS='--merge' + +TESTS = test-utils-muxer -- 2.34.1