From 331731aa31dbd587ebd54e32c7f6c136f34aef7e Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 13 Jun 2019 14:23:20 -0400 Subject: [PATCH] tests: Move ctf-writer to it's own directory Signed-off-by: Michael Jeanson Change-Id: I4033b31392867c468419aa43f31675af3842c6f1 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1427 Tested-by: jenkins Reviewed-by: Philippe Proulx --- .gitignore | 4 ++-- configure.ac | 3 ++- tests/Makefile.am | 9 ++++++--- tests/ctf-writer/Makefile.am | 9 +++++++++ tests/{lib/test_ctf_writer.c => ctf-writer/ctf_writer.c} | 0 .../test_ctf_writer.in} | 2 +- tests/lib/Makefile.am | 7 +------ 7 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 tests/ctf-writer/Makefile.am rename tests/{lib/test_ctf_writer.c => ctf-writer/ctf_writer.c} (100%) rename tests/{lib/test_ctf_writer_complete.in => ctf-writer/test_ctf_writer.in} (95%) diff --git a/.gitignore b/.gitignore index b460d111..3e318243 100644 --- a/.gitignore +++ b/.gitignore @@ -11,13 +11,13 @@ /tests/bin/intersection/test_intersection /tests/bin/test_packet_seq_num /tests/bin/test_trace_read +/tests/ctf-writer/ctf_writer +/tests/ctf-writer/test_ctf_writer /tests/lib/test_bitfield /tests/lib/test_bt_ctf_field_type_validation /tests/lib/test_bt_objects /tests/lib/test_bt_values /tests/lib/test_trace_ir_ref -/tests/lib/test_ctf_writer -/tests/lib/test_ctf_writer_complete /tests/lib/test_ir_visit /tests/lib/test_trace_listener /tests/lib/test_plugin diff --git a/configure.ac b/configure.ac index 449df8d2..e79321e9 100644 --- a/configure.ac +++ b/configure.ac @@ -777,6 +777,7 @@ AC_CONFIG_FILES([ src/plugins/utils/muxer/Makefile src/plugins/utils/trimmer/Makefile src/python-plugin-provider/Makefile + tests/ctf-writer/Makefile tests/lib/Makefile tests/lib/test-plugin-plugins/Makefile tests/Makefile @@ -793,7 +794,7 @@ AC_CONFIG_FILES([tests/cli/test_packet_seq_num], [chmod +x tests/cli/test_packet AC_CONFIG_FILES([tests/cli/test_trace_copy], [chmod +x tests/cli/test_trace_copy]) AC_CONFIG_FILES([tests/cli/test_trace_read], [chmod +x tests/cli/test_trace_read]) AC_CONFIG_FILES([tests/cli/test_trimmer], [chmod +x tests/cli/test_trimmer]) -AC_CONFIG_FILES([tests/lib/test_ctf_writer_complete], [chmod +x tests/lib/test_ctf_writer_complete]) +AC_CONFIG_FILES([tests/ctf-writer/test_ctf_writer], [chmod +x tests/ctf-writer/test_ctf_writer]) AC_CONFIG_FILES([tests/lib/test_plugin_complete], [chmod +x tests/lib/test_plugin_complete]) AC_CONFIG_FILES([tests/lib/trace-ir/test_trace_ir], [chmod +x tests/lib/trace-ir/test_trace_ir]) AC_CONFIG_FILES([tests/plugins/ctf/test_ctf_plugin], [chmod +x tests/plugins/ctf/test_ctf_plugin]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 344bc646..2f5ed60e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = utils lib plugins +SUBDIRS = utils lib ctf-writer plugins # Directories added to EXTRA_DIST will be recursively copied to the distribution. EXTRA_DIST = $(srcdir)/ctf-traces \ @@ -49,10 +49,12 @@ TESTS_CLI = \ TESTS_LIB = \ lib/test_bitfield \ lib/test_bt_values \ - lib/test_ctf_writer_complete \ lib/test_graph_topo \ lib/test_trace_ir_ref +TESTS_CTF_WRITER = \ + ctf-writer/test_ctf_writer + if !ENABLE_BUILT_IN_PLUGINS TESTS_LIB += lib/test_plugin_complete endif @@ -94,7 +96,7 @@ endif LOG_DRIVER_FLAGS = '--merge' LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/config/tap-driver.sh -TESTS = $(TESTS_BINDINGS) $(TESTS_CLI) $(TESTS_LIB) \ +TESTS = $(TESTS_BINDINGS) $(TESTS_CLI) $(TESTS_CTF_WRITER) $(TESTS_LIB) \ $(TESTS_PLUGINS) $(TESTS_PYTHON_PLUGIN_PROVIDER) define check_target @@ -104,6 +106,7 @@ endef $(eval $(call check_target,bindings,$(TESTS_BINDINGS))) $(eval $(call check_target,cli,$(TESTS_CLI))) +$(eval $(call check_target,ctf-writer,$(TESTS_CTF_WRITER))) $(eval $(call check_target,lib,$(TESTS_LIB))) $(eval $(call check_target,plugins,$(TESTS_PLUGINS))) $(eval $(call check_target,python-plugin-provider,$(TESTS_PYTHON_PLUGIN_PROVIDER))) diff --git a/tests/ctf-writer/Makefile.am b/tests/ctf-writer/Makefile.am new file mode 100644 index 00000000..d047689d --- /dev/null +++ b/tests/ctf-writer/Makefile.am @@ -0,0 +1,9 @@ +AM_CPPFLAGS += -I$(top_srcdir)/tests/utils + +noinst_PROGRAMS = ctf_writer + +ctf_writer_SOURCES = ctf_writer.c +ctf_writer_LDADD = \ + $(top_builddir)/tests/utils/tap/libtap.la \ + $(top_builddir)/tests/utils/libtestcommon.la \ + $(top_builddir)/src/ctf-writer/libbabeltrace2-ctf-writer.la diff --git a/tests/lib/test_ctf_writer.c b/tests/ctf-writer/ctf_writer.c similarity index 100% rename from tests/lib/test_ctf_writer.c rename to tests/ctf-writer/ctf_writer.c diff --git a/tests/lib/test_ctf_writer_complete.in b/tests/ctf-writer/test_ctf_writer.in similarity index 95% rename from tests/lib/test_ctf_writer_complete.in rename to tests/ctf-writer/test_ctf_writer.in index abb05758..897c3fee 100644 --- a/tests/lib/test_ctf_writer_complete.in +++ b/tests/ctf-writer/test_ctf_writer.in @@ -22,4 +22,4 @@ NO_SH_TAP=1 curdir="$(cd -P "$(dirname "$0")" >/dev/null && pwd)" -"${curdir}/test_ctf_writer" "$BT_BIN" +"${curdir}/ctf_writer" "$BT_BIN" diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am index 16616ccf..14912a17 100644 --- a/tests/lib/Makefile.am +++ b/tests/lib/Makefile.am @@ -8,10 +8,6 @@ COMMON_TEST_LDADD = \ test_bitfield_LDADD = $(COMMON_TEST_LDADD) -test_ctf_writer_LDADD = \ - $(COMMON_TEST_LDADD) \ - $(top_builddir)/src/ctf-writer/libbabeltrace2-ctf-writer.la - test_bt_values_LDADD = $(COMMON_TEST_LDADD) \ $(top_builddir)/src/lib/libbabeltrace2.la @@ -22,11 +18,10 @@ test_trace_ir_ref_LDADD = $(COMMON_TEST_LDADD) \ test_graph_topo_LDADD = $(COMMON_TEST_LDADD) \ $(top_builddir)/src/lib/libbabeltrace2.la -noinst_PROGRAMS = test_bitfield test_ctf_writer test_bt_values \ +noinst_PROGRAMS = test_bitfield test_bt_values \ test_trace_ir_ref test_graph_topo test_bitfield_SOURCES = test_bitfield.c -test_ctf_writer_SOURCES = test_ctf_writer.c 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 -- 2.34.1