tests: build system spring cleanup
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 29 May 2019 20:48:44 +0000 (16:48 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 6 Jun 2019 19:04:56 +0000 (15:04 -0400)
 * 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 <mjeanson@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1350
CI-Build: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: jenkins
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
28 files changed:
.gitignore
configure.ac
tests/Makefile.am
tests/bindings/Makefile.am [deleted file]
tests/bindings/python/Makefile.am [deleted file]
tests/bindings/python/bt2/Makefile.am [deleted file]
tests/cli/Makefile.am [deleted file]
tests/cli/intersection/Makefile.am [deleted file]
tests/cli/intersection/test_intersection.in [deleted file]
tests/cli/test_intersection.in [new file with mode: 0644]
tests/ctf-traces/fail/lttng-modules-2.0-pre1/metadata [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/metadata [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_0 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_1 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_2 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_3 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_4 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_5 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_6 [changed mode: 0755->0644]
tests/ctf-traces/succeed/wk-heartbeat-u/u_7 [changed mode: 0755->0644]
tests/lib/Makefile.am
tests/lib/ctf-writer/Makefile.am [deleted file]
tests/lib/trace-ir/Makefile.am [deleted file]
tests/plugins/Makefile.am
tests/plugins/ctf/Makefile.am [deleted file]
tests/python-plugin-provider/Makefile.am [deleted file]
tests/utils/Makefile.am
tests/utils/tap/Makefile.am

index ceaa6dfe8694b72591f4e11f269edfd5514a55d7..3d69e9f7d79abbef0d7e8cce040ee1755a276268 100644 (file)
@@ -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
index 8f856e27a2cdfbdf8330680dcea5b32413be26e4..1f2400e3864ce1bd51dc25d6a2058f3d906326d6 100644 (file)
@@ -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])
index 4a5ef55970d4ff2e6c81967702a23db05033451d..36e62592d0b8aa4695083348a362c891b3d976bc 100644 (file)
@@ -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 (file)
index 773e43a..0000000
+++ /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 (file)
index f3cec07..0000000
+++ /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 (file)
index 09261c7..0000000
+++ /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 (file)
index 1191af4..0000000
+++ /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 (file)
index efbe74a..0000000
+++ /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/intersection/test_intersection.in
deleted file mode 100644 (file)
index 7cea9be..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) - 2015 Julien Desfossez <jdesfossez@efficios.com>
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License, version 2 only, as
-# published by the Free Software Foundation.
-#
-# 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., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-. "@abs_top_builddir@/tests/utils/common.sh"
-
-NUM_TESTS=10
-
-plan_tests $NUM_TESTS
-
-test_intersect() {
-       trace="$1"
-       totalevents="$2"
-       intersect="$3"
-
-       test $("${BT_BIN}" "$trace" | wc -l) = "$totalevents"
-       ok $? "$totalevents events in the whole trace"
-       test $("${BT_BIN}" --stream-intersection "$trace" 2>/dev/null| wc -l) = "$intersect"
-       ok $? "$intersect events in packets intersecting"
-}
-
-diag "Test the stream intersection feature"
-
-diag "2 streams offsetted with 3 packets intersecting"
-test_intersect "${BT_CTF_TRACES}/intersection/3eventsintersect" 8 3
-
-diag "2 streams offsetted with 3 packets intersecting (exchanged file names)"
-test_intersect "${BT_CTF_TRACES}/intersection/3eventsintersectreverse" 8 3
-
-diag "No intersection between 2 streams"
-test_intersect "${BT_CTF_TRACES}/intersection/nointersect" 6 0
-
-diag "Only 1 stream"
-test_intersect "${BT_CTF_TRACES}/intersection/onestream" 3 3
-
-diag "No stream at all"
-test_intersect "${BT_CTF_TRACES}/intersection/nostream" 0 0
diff --git a/tests/cli/test_intersection.in b/tests/cli/test_intersection.in
new file mode 100644 (file)
index 0000000..7cea9be
--- /dev/null
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# Copyright (C) - 2015 Julien Desfossez <jdesfossez@efficios.com>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License, version 2 only, as
+# published by the Free Software Foundation.
+#
+# 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., 51
+# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+. "@abs_top_builddir@/tests/utils/common.sh"
+
+NUM_TESTS=10
+
+plan_tests $NUM_TESTS
+
+test_intersect() {
+       trace="$1"
+       totalevents="$2"
+       intersect="$3"
+
+       test $("${BT_BIN}" "$trace" | wc -l) = "$totalevents"
+       ok $? "$totalevents events in the whole trace"
+       test $("${BT_BIN}" --stream-intersection "$trace" 2>/dev/null| wc -l) = "$intersect"
+       ok $? "$intersect events in packets intersecting"
+}
+
+diag "Test the stream intersection feature"
+
+diag "2 streams offsetted with 3 packets intersecting"
+test_intersect "${BT_CTF_TRACES}/intersection/3eventsintersect" 8 3
+
+diag "2 streams offsetted with 3 packets intersecting (exchanged file names)"
+test_intersect "${BT_CTF_TRACES}/intersection/3eventsintersectreverse" 8 3
+
+diag "No intersection between 2 streams"
+test_intersect "${BT_CTF_TRACES}/intersection/nointersect" 6 0
+
+diag "Only 1 stream"
+test_intersect "${BT_CTF_TRACES}/intersection/onestream" 3 3
+
+diag "No stream at all"
+test_intersect "${BT_CTF_TRACES}/intersection/nostream" 0 0
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index f66b73ece58d84e00cd86e70e207c5c280e4c2ea..444654f98a634b379458d995af636749ebc5096b 100644 (file)
@@ -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 (file)
index 8a64072..0000000
+++ /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 (file)
index 70d219e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-if ENABLE_PYTHON_BINDINGS
-check_SCRIPTS = test_trace_ir
-endif
index ed129cbde050544cc11d44f0b939ddcc6e123374..8744e8ae32fe771aed65d89920a77a7e46244c25 100644 (file)
@@ -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 (file)
index d10498a..0000000
+++ /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 (file)
index 6f72c4c..0000000
+++ /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
index 6762febe3882783d738d0864a18b26d14cdea3c8..c23292e23d3aaa8e0e7e1149f2c46808fd294ada 100644 (file)
@@ -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
index 8b224c48233b658fb2e9a1d0b21b9d8ee5e50208..bf12125581ad90a2981557ff8275c47b3280f2d0 100644 (file)
@@ -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
This page took 0.034295 seconds and 4 git commands to generate.