From 7bb90dd0a5fb8b11ca6e4a7086c66623378fccea Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 29 May 2019 16:48:44 -0400 Subject: [PATCH] tests: build system spring cleanup * Remove AC_CONFIG_FILES generated files from check_SCRIPTS and EXTRA_DIST since they are already included. * Remove useless conditionnals on AC_CONFIG_FILES generated files since they are always included. * Reduce the number of mostly unused Makefiles * Remove execute permission on data files Change-Id: I4e82bac01bf2033409c67508a4d60127a0e77f14 Signed-off-by: Michael Jeanson Reviewed-on: https://review.lttng.org/c/babeltrace/+/1350 CI-Build: Francis Deslauriers Tested-by: jenkins Reviewed-by: Francis Deslauriers Reviewed-by: Philippe Proulx --- .gitignore | 3 +- configure.ac | 11 +---- tests/Makefile.am | 41 +++++++++++++++--- tests/bindings/Makefile.am | 3 -- tests/bindings/python/Makefile.am | 1 - tests/bindings/python/bt2/Makefile.am | 25 ----------- tests/cli/Makefile.am | 2 - tests/cli/intersection/Makefile.am | 15 ------- .../{intersection => }/test_intersection.in | 0 .../fail/lttng-modules-2.0-pre1/metadata | Bin .../succeed/wk-heartbeat-u/metadata | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_0 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_1 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_2 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_3 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_4 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_5 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_6 | Bin tests/ctf-traces/succeed/wk-heartbeat-u/u_7 | Bin tests/lib/Makefile.am | 7 ++- tests/lib/ctf-writer/Makefile.am | 5 --- tests/lib/trace-ir/Makefile.am | 3 -- tests/plugins/Makefile.am | 19 +++----- tests/plugins/ctf/Makefile.am | 1 - tests/python-plugin-provider/Makefile.am | 4 -- tests/utils/Makefile.am | 16 +------ tests/utils/tap/Makefile.am | 18 +------- 27 files changed, 48 insertions(+), 126 deletions(-) delete mode 100644 tests/bindings/Makefile.am delete mode 100644 tests/bindings/python/Makefile.am delete mode 100644 tests/bindings/python/bt2/Makefile.am delete mode 100644 tests/cli/Makefile.am delete mode 100644 tests/cli/intersection/Makefile.am rename tests/cli/{intersection => }/test_intersection.in (100%) mode change 100755 => 100644 tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/metadata mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_0 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_1 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_2 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_3 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_4 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_5 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_6 mode change 100755 => 100644 tests/ctf-traces/succeed/wk-heartbeat-u/u_7 delete mode 100644 tests/lib/ctf-writer/Makefile.am delete mode 100644 tests/lib/trace-ir/Makefile.am delete mode 100644 tests/plugins/ctf/Makefile.am delete mode 100644 tests/python-plugin-provider/Makefile.am diff --git a/.gitignore b/.gitignore index ceaa6dfe..3d69e9f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,7 @@ *~ -/tests/cli/intersection/bt_python_helper.py -/tests/cli/intersection/test_intersection /tests/cli/test_convert_args /tests/cli/test_debug_info +/tests/cli/test_intersection /tests/cli/test_packet_seq_num /tests/cli/test_trace_copy /tests/cli/test_trace_read diff --git a/configure.ac b/configure.ac index 8f856e27..1f2400e3 100644 --- a/configure.ac +++ b/configure.ac @@ -749,21 +749,12 @@ AC_CONFIG_FILES([ logging/Makefile bindings/Makefile tests/Makefile - tests/cli/Makefile - tests/cli/intersection/Makefile tests/lib/Makefile tests/lib/test-plugin-plugins/Makefile - tests/lib/trace-ir/Makefile - tests/lib/ctf-writer/Makefile tests/utils/common.sh tests/utils/Makefile tests/utils/tap/Makefile - tests/bindings/Makefile - tests/bindings/python/Makefile - tests/bindings/python/bt2/Makefile tests/plugins/Makefile - tests/plugins/ctf/Makefile - tests/python-plugin-provider/Makefile extras/Makefile extras/valgrind/Makefile plugins/Makefile @@ -791,7 +782,7 @@ AC_CONFIG_FILES([ babeltrace-ctf.pc ]) -AC_CONFIG_FILES([tests/cli/intersection/test_intersection], [chmod +x tests/cli/intersection/test_intersection]) +AC_CONFIG_FILES([tests/cli/test_intersection], [chmod +x tests/cli/test_intersection]) AC_CONFIG_FILES([tests/cli/test_convert_args], [chmod +x tests/cli/test_convert_args]) AC_CONFIG_FILES([tests/cli/test_output_ctf_metadata], [chmod +x tests/cli/test_output_ctf_metadata]) AC_CONFIG_FILES([tests/cli/test_packet_seq_num], [chmod +x tests/cli/test_packet_seq_num]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 4a5ef559..36e62592 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,15 +1,42 @@ -SUBDIRS = utils cli lib bindings plugins +SUBDIRS = utils lib plugins # Directories added to EXTRA_DIST will be recursively copied to the distribution. EXTRA_DIST = $(srcdir)/ctf-traces \ - $(srcdir)/debug-info-data + $(srcdir)/debug-info-data \ + bindings/python/bt2/.coveragerc + +dist_check_SCRIPTS = \ + bindings/python/babeltrace/test_ctf_writer_empty_packet.py \ + bindings/python/babeltrace/test_ctf_writer_no_packet_context.py \ + bindings/python/babeltrace/test_ctf_writer.py \ + bindings/python/bt2/test_clock_class_priority_map.py \ + bindings/python/bt2/test_clock_class.py \ + bindings/python/bt2/test_component_class.py \ + bindings/python/bt2/test_component.py \ + bindings/python/bt2/test_connection.py \ + bindings/python/bt2/test_ctf_writer_clock.py \ + bindings/python/bt2/test_event_class.py \ + bindings/python/bt2/test_event.py \ + bindings/python/bt2/test_field_class.py \ + bindings/python/bt2/test_field.py \ + bindings/python/bt2/test_graph.py \ + bindings/python/bt2/test_message_iterator.py \ + bindings/python/bt2/test_message.py \ + bindings/python/bt2/test_packet.py \ + bindings/python/bt2/test_plugin.py \ + bindings/python/bt2/test_port.py \ + bindings/python/bt2/test_query_executor.py \ + bindings/python/bt2/test_stream_class.py \ + bindings/python/bt2/test_stream.py \ + bindings/python/bt2/test_trace_collection_message_iterator.py \ + bindings/python/bt2/test_trace.py \ + bindings/python/bt2/test_value.py \ + bindings/python/bt2/utils.py \ + python-plugin-provider/bt_plugin_test_python_plugin_provider.py \ + python-plugin-provider/test_python_plugin_provider.py TESTS_BINDINGS = -if ENABLE_PYTHON_PLUGINS -SUBDIRS += python-plugin-provider -endif - if ENABLE_PYTHON_BINDINGS TESTS_BINDINGS += bindings/python/bt2/test_python_bt2 \ bindings/python/babeltrace/test_python_babeltrace @@ -19,7 +46,7 @@ TESTS_CLI = \ cli/test_trace_read \ cli/test_packet_seq_num \ cli/test_convert_args \ - cli/intersection/test_intersection \ + cli/test_intersection \ cli/test_trace_copy \ cli/test_trimmer diff --git a/tests/bindings/Makefile.am b/tests/bindings/Makefile.am deleted file mode 100644 index 773e43ad..00000000 --- a/tests/bindings/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -if ENABLE_PYTHON_BINDINGS -SUBDIRS = python -endif diff --git a/tests/bindings/python/Makefile.am b/tests/bindings/python/Makefile.am deleted file mode 100644 index f3cec072..00000000 --- a/tests/bindings/python/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = bt2 diff --git a/tests/bindings/python/bt2/Makefile.am b/tests/bindings/python/bt2/Makefile.am deleted file mode 100644 index 09261c70..00000000 --- a/tests/bindings/python/bt2/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -EXTRA_DIST = \ - test_clock_class_priority_map.py \ - test_clock_class.py \ - test_component.py \ - test_component_class.py \ - test_connection.py \ - test_ctf_writer_clock.py \ - test_event.py \ - test_event_class.py \ - test_field_class.py \ - test_field.py \ - test_graph.py \ - test_message.py \ - test_message_iterator.py \ - test_packet.py \ - test_plugin.py \ - test_port.py \ - test_query_executor.py \ - test_stream.py \ - test_stream_class.py \ - test_trace.py \ - test_trace_collection_message_iterator.py \ - test_value.py \ - utils.py \ - .coveragerc diff --git a/tests/cli/Makefile.am b/tests/cli/Makefile.am deleted file mode 100644 index 1191af41..00000000 --- a/tests/cli/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -SUBDIRS = intersection -check_SCRIPTS = test_trace_read test_packet_seq_num test_convert_args test_trace_copy diff --git a/tests/cli/intersection/Makefile.am b/tests/cli/intersection/Makefile.am deleted file mode 100644 index efbe74a1..00000000 --- a/tests/cli/intersection/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -check_SCRIPTS = test_intersection - -all-local: - @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(EXTRA_DIST); do \ - cp -f $(srcdir)/$$script $(builddir); \ - done; \ - fi - -clean-local: - @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(EXTRA_DIST); do \ - rm -f $(builddir)/$$script; \ - done; \ - fi diff --git a/tests/cli/intersection/test_intersection.in b/tests/cli/test_intersection.in similarity index 100% rename from tests/cli/intersection/test_intersection.in rename to tests/cli/test_intersection.in diff --git a/tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata b/tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/metadata b/tests/ctf-traces/succeed/wk-heartbeat-u/metadata old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_0 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_0 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_1 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_1 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_2 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_2 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_3 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_3 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_4 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_4 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_5 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_5 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_6 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_6 old mode 100755 new mode 100644 diff --git a/tests/ctf-traces/succeed/wk-heartbeat-u/u_7 b/tests/ctf-traces/succeed/wk-heartbeat-u/u_7 old mode 100755 new mode 100644 diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index f66b73ec..444654f9 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -1,9 +1,11 @@ -SUBDIRS = trace-ir ctf-writer +SUBDIRS = AM_CPPFLAGS += -I$(top_srcdir)/tests/utils LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la +dist_check_SCRIPTS = ctf-writer/test_auto_populate.py + libtestcommon_la_SOURCES = common.c common.h noinst_LTLIBRARIES = libtestcommon.la @@ -32,12 +34,9 @@ test_bt_values_SOURCES = test_bt_values.c test_trace_ir_ref_SOURCES = test_trace_ir_ref.c test_graph_topo_SOURCES = test_graph_topo.c -check_SCRIPTS = test_ctf_writer_complete - if !ENABLE_BUILT_IN_PLUGINS noinst_PROGRAMS += test_plugin test_plugin_LDADD = $(COMMON_TEST_LDADD) test_plugin_SOURCES = test_plugin.c -check_SCRIPTS += test_plugin_complete SUBDIRS += test-plugin-plugins endif diff --git a/tests/lib/ctf-writer/Makefile.am b/tests/lib/ctf-writer/Makefile.am deleted file mode 100644 index 8a64072c..00000000 --- a/tests/lib/ctf-writer/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -if ENABLE_PYTHON_BINDINGS -check_SCRIPTS = test_ctf_writer -endif - -EXTRA_DIST = test_auto_populate.py diff --git a/tests/lib/trace-ir/Makefile.am b/tests/lib/trace-ir/Makefile.am deleted file mode 100644 index 70d219e6..00000000 --- a/tests/lib/trace-ir/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -if ENABLE_PYTHON_BINDINGS -check_SCRIPTS = test_trace_ir -endif diff --git a/tests/plugins/Makefile.am b/tests/plugins/Makefile.am index ed129cbd..8744e8ae 100644 --- a/tests/plugins/Makefile.am +++ b/tests/plugins/Makefile.am @@ -1,10 +1,11 @@ -SUBDIRS = ctf - AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(top_srcdir)/plugins LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la -check_SCRIPTS = +dist_check_SCRIPTS = \ + test_lttng_utils_debug_info.py\ + ctf/test_query_trace_info.py + noinst_PROGRAMS = if !ENABLE_BUILT_IN_PLUGINS @@ -12,6 +13,8 @@ if !ENABLE_BUILT_IN_PLUGINS endif # !ENABLE_BUILT_IN_PLUGINS if ENABLE_DEBUG_INFO +noinst_PROGRAMS += test_dwarf test_bin_info + test_dwarf_LDADD = \ $(top_builddir)/plugins/lttng-utils/debug-info/libdebug-info.la \ $(top_builddir)/fd-cache/libbabeltrace-fd-cache.la \ @@ -29,14 +32,4 @@ test_bin_info_LDADD = \ $(ELFUTILS_LIBS) \ $(LIBTAP) test_bin_info_SOURCES = test_bin_info.c - -noinst_PROGRAMS += test_dwarf test_bin_info - -if !ENABLE_BUILT_IN_PLUGINS -if ENABLE_PYTHON_BINDINGS -check_SCRIPTS += test_lttng_utils_debug_info -endif # !ENABLE_BUILT_IN_PLUGINS -endif # ENABLE_PYTHON_BINDINGS endif # ENABLE_DEBUG_INFO - -EXTRA_DIST = test_lttng_utils_debug_info.py diff --git a/tests/plugins/ctf/Makefile.am b/tests/plugins/ctf/Makefile.am deleted file mode 100644 index d10498ad..00000000 --- a/tests/plugins/ctf/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -dist_check_SCRIPTS = test_query_trace_info.py diff --git a/tests/python-plugin-provider/Makefile.am b/tests/python-plugin-provider/Makefile.am deleted file mode 100644 index 6f72c4c8..00000000 --- a/tests/python-plugin-provider/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -check_SCRIPTS = test_python_plugin_provider -EXTRA_DIST = \ - test_python_plugin_provider.py \ - bt_plugin_test_python_plugin_provider.py diff --git a/tests/utils/Makefile.am b/tests/utils/Makefile.am index 6762febe..c23292e2 100644 --- a/tests/utils/Makefile.am +++ b/tests/utils/Makefile.am @@ -1,15 +1,3 @@ SUBDIRS = tap -EXTRA_DIST = python/testrunner.py \ - python/tap/adapter.py \ - python/tap/directive.py \ - python/tap/formatter.py \ - python/tap/i18n.py \ - python/tap/__init__.py \ - python/tap/LICENSE \ - python/tap/line.py \ - python/tap/loader.py \ - python/tap/main.py \ - python/tap/parser.py \ - python/tap/rules.py \ - python/tap/runner.py \ - python/tap/tracker.py +# Directories added to EXTRA_DIST will be recursively copied to the distribution. +EXTRA_DIST = python diff --git a/tests/utils/tap/Makefile.am b/tests/utils/tap/Makefile.am index 8b224c48..bf121255 100644 --- a/tests/utils/tap/Makefile.am +++ b/tests/utils/tap/Makefile.am @@ -1,20 +1,4 @@ noinst_LTLIBRARIES = libtap.la libtap_la_SOURCES = tap.c tap.h -SCRIPT_LIST = tap.sh - -dist_noinst_SCRIPTS = $(SCRIPT_LIST) - -all-local: - @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(SCRIPT_LIST); do \ - cp -f $(srcdir)/$$script $(builddir); \ - done; \ - fi - -clean-local: - @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ - for script in $(SCRIPT_LIST); do \ - rm -f $(builddir)/$$script; \ - done; \ - fi +dist_noinst_SCRIPTS = tap.sh -- 2.34.1