tests/lib/Makefile.am: use DISTCLEANFILES instead of CLEANFILES
PATCH 2/3 tests/lib/Makefile.am: use DISTCLEANFILES instead of CLEANFILES
In reply to a message not in the archiveFiles test_seek_empty_packet and test_seek_big_trace are generated by configuring, not by making. Therefore, we do not want a make clean to remove them. Otherwise, doing...
* make
* make clean
* make
* make check
... fails.
We want, however, to delete them when doing make distclean.
--- tests/lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/lib/Makefile.am +1 -1
@@ -43,7 +43,7 @@ test_bt_ctf_field_type_validation_SOURCES = test_bt_ctf_field_type_validation.c SCRIPT_LIST = test_ctf_writer_complete EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in -CLEANFILES= test_seek_big_trace test_seek_empty_packet +DISTCLEANFILES = test_seek_big_trace test_seek_empty_packet if ENABLE_DEBUGINFO test_dwarf_LDFLAGS = -static
Signature · 6 lines
2.8.0 _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
PATCH 3/3 tests/lib: Make test_dwarf and test_bin_info tests work out-of-tree
In reply to a message not in the archiveWhen building out of tree, these tests fail to find the test data. This patch makes them (their _complete wrappers, actually) generated by Autoconf, so the proper path to the test data (which is in the source directory) can be written.
--- configure.ac | 2 ++ tests/lib/Makefile.am | 11 ++++++++--- tests/lib/test_bin_info_complete | 22 ---------------------- tests/lib/test_bin_info_complete.in | 22 ++++++++++++++++++++++ tests/lib/test_dwarf_complete | 22 ---------------------- tests/lib/test_dwarf_complete.in | 21 +++++++++++++++++++++ 6 files changed, 53 insertions(+), 47 deletions(-) delete mode 100755 tests/lib/test_bin_info_complete create mode 100755 tests/lib/test_bin_info_complete.in delete mode 100755 tests/lib/test_dwarf_complete create mode 100755 tests/lib/test_dwarf_complete.in
configure.ac +2 -0
@@ -353,6 +353,8 @@ AC_CONFIG_FILES([ AC_CONFIG_FILES([tests/lib/test_seek_big_trace], [chmod +x tests/lib/test_seek_big_trace]) AC_CONFIG_FILES([tests/lib/test_seek_empty_packet], [chmod +x tests/lib/test_seek_empty_packet]) +AC_CONFIG_FILES([tests/lib/test_dwarf_complete], [chmod +x tests/lib/test_dwarf_complete]) +AC_CONFIG_FILES([tests/lib/test_bin_info_complete], [chmod +x tests/lib/test_bin_info_complete]) AC_CONFIG_FILES([tests/bin/test_trace_read], [chmod +x tests/bin/test_trace_read]) AC_CONFIG_FILES([tests/bin/test_intersection], [chmod +x tests/bin/test_intersection]) AC_CONFIG_FILES([tests/bin/test_packet_seq_num], [chmod +x tests/bin/test_packet_seq_num])
tests/lib/Makefile.am +8 -3
@@ -42,8 +42,14 @@ test_ctf_ir_ref_SOURCES = test_ctf_ir_ref.c test_bt_ctf_field_type_validation_SOURCES = test_bt_ctf_field_type_validation.c SCRIPT_LIST = test_ctf_writer_complete -EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in -DISTCLEANFILES = test_seek_big_trace test_seek_empty_packet +EXTRA_DIST = test_seek_big_trace.in \ + test_seek_empty_packet.in \ + test_dwarf_complete.in \ + test_bin_info_complete.in +DISTCLEANFILES = test_seek_big_trace \ + test_seek_empty_packet \ + test_dwarf_complete \ + test_bin_info_complete if ENABLE_DEBUGINFO test_dwarf_LDFLAGS = -static
@@ -59,7 +65,6 @@ test_bin_info_LDADD = $(LIBTAP) \ test_bin_info_SOURCES = test_bin_info.c noinst_PROGRAMS += test_dwarf test_bin_info -SCRIPT_LIST += test_dwarf_complete test_bin_info_complete endif dist_noinst_SCRIPTS = $(SCRIPT_LIST)
tests/lib/test_bin_info_complete deleted +0 -22
@@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2015 - Antoine Busque <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -CURDIR=$(dirname $0)/ -ROOTDIR=$CURDIR../.. - -$CURDIR/test_bin_info $ROOTDIR/tests/debuginfo-data
tests/lib/test_bin_info_complete.in new file +22 -0
@@ -0,0 +1,22 @@ +#!/bin/sh +# +# Copyright (C) 2015 - Antoine Busque <[email protected]> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; only version 2 +# of the License. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +DEBUGINFO_DATA=@abs_top_srcdir@/tests/debuginfo-data + +@abs_top_builddir@/tests/lib/test_bin_info $DEBUGINFO_DATA
tests/lib/test_dwarf_complete deleted +0 -22
@@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2015 - Antoine Busque <[email protected]> -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. -# -# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -CURDIR=$(dirname $0)/ -ROOTDIR=$CURDIR../.. - -$CURDIR/test_dwarf $ROOTDIR/tests/debuginfo-data
tests/lib/test_dwarf_complete.in new file +21 -0
@@ -0,0 +1,21 @@ +#!/bin/sh +# +# Copyright (C) 2015 - Antoine Busque <[email protected]> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; only version 2 +# of the License. +# +# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +DEBUGINFO_DATA=@abs_top_srcdir@/tests/debuginfo-data + +@abs_top_builddir@/tests/lib/test_dwarf $DEBUGINFO_DATA
Signature · 6 lines
2.8.0 _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [PATCH 1/3] tests/lib/Makefile.am: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
In reply to a message not in the archiveQuoted 26 lines · Simon Marchi
Since these files are generated by autoconf, they shouldn't be included in
SCRIPT_LIST, which is the list of scripts to copy from the source directory to the build directory. This gets rid of these warnings when building:cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_big_trace': No such file or directory
cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_empty_packet': No such file or directorySigned-off-by Simon Marchi <[email protected]>--- tests/lib/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)tests/lib/Makefile.am +0
-0@@ -41,9 +41,7 @@ test_bt_values_SOURCES = test_bt_values.c test_ctf_ir_ref_SOURCES = test_ctf_ir_ref.c test_bt_ctf_field_type_validation_SOURCES =
test_bt_ctf_field_type_validation.c
tests/lib/Makefile.am
Quoted 6 lines
tests/lib/Makefile.am +1
-3-SCRIPT_LIST = test_seek_big_trace \ - test_seek_empty_packet \ - test_ctf_writer_complete +SCRIPT_LIST = test_ctf_writer_complete EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in CLEANFILES= test_seek_big_trace test_seek_empty_packet
Sorry, forgot to mention that this series is meant for babeltrace.
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [PATCH 1/3] tests/lib/Makefile.am: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
In reply to a message not in the archiveQuoted 27 lines · ----- On Apr 27, 2016, at 11:04 PM, Simon Marchi [email protected] wrote:
Quoted 26 lines · Simon Marchi
Since these files are generated by autoconf, they shouldn't be included in
SCRIPT_LIST, which is the list of scripts to copy from the source directory to the build directory. This gets rid of these warnings when building:cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_big_trace': No such file or directory
cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_empty_packet': No such file or directorySigned-off-by Simon Marchi <[email protected]>--- tests/lib/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)tests/lib/Makefile.am +0
-0@@ -41,9 +41,7 @@ test_bt_values_SOURCES = test_bt_values.c test_ctf_ir_ref_SOURCES = test_ctf_ir_ref.c test_bt_ctf_field_type_validation_SOURCES =
test_bt_ctf_field_type_validation.c
Quoted 8 lines
tests/lib/Makefile.am
Quoted 6 lines
tests/lib/Makefile.am +1
-3-SCRIPT_LIST = test_seek_big_trace \ - test_seek_empty_packet \ - test_ctf_writer_complete +SCRIPT_LIST = test_ctf_writer_complete EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in CLEANFILES= test_seek_big_trace test_seek_empty_packetSorry, forgot to mention that this series is meant for babeltrace.
Good catch, I reviewed the patches and I'm working on an updated version to do further cleanup of the Makefile and test scripts generation.
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [PATCH 1/3] tests/lib/Makefile.am: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
In reply to a message not in the archiveQuoted 39 lines · Michael Jeanson
----- On Apr 27, 2016, at 11:04 PM, Simon Marchi
Quoted 27 lines · [email protected] wrote:
Quoted 26 lines · Simon Marchi
Since these files are generated by autoconf, they shouldn't be included in
SCRIPT_LIST, which is the list of scripts to copy from the source directory to the build directory. This gets rid of these warnings when building:cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_big_trace': No such file or directory
cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_empty_packet': No such file or directorySigned-off-by Simon Marchi <[email protected]>--- tests/lib/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)tests/lib/Makefile.am +0
-0@@ -41,9 +41,7 @@ test_bt_values_SOURCES = test_bt_values.c test_ctf_ir_ref_SOURCES = test_ctf_ir_ref.c test_bt_ctf_field_type_validation_SOURCES =
test_bt_ctf_field_type_validation.cQuoted 8 lines
tests/lib/Makefile.am
Quoted 6 lines
tests/lib/Makefile.am +1
-3-SCRIPT_LIST = test_seek_big_trace \ - test_seek_empty_packet \ - test_ctf_writer_complete +SCRIPT_LIST = test_ctf_writer_complete EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in CLEANFILES= test_seek_big_trace test_seek_empty_packetSorry, forgot to mention that this series is meant for babeltrace.
Quoted 3 lines
Good catch, I reviewed the patches and I'm working on an updated version to do further cleanup of the
Makefileand test scripts generation.
Ok thanks.
Just an idea: I find it quite cumbersome to add a new entry in configure.ac for each test script that we want autoconf to process (such as in patch 3/3). I think it could be easier to have a single file (e.g. vars.sh) and have it contain definitions of various directories:
srcdir=@srcdir@
top_srcdir=@top_srcdir@
abs_top_srcdir=@abs_top_srcdir@
builddir=@builddir@
...
This way, you could have only a single generated file (vars.sh.in -> vars.sh), and each test script would just have to source that file to use the values.
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [PATCH 1/3] tests/lib/Makefile.am: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
In reply to a message not in the archiveQuoted 62 lines · Simon Marchi
Quoted 43 lines · Michael Jeanson
----- On Apr 27, 2016, at 11:04 PM, Simon Marchi [email protected]
Quoted 28 lines · wrote:
Quoted 27 lines · Simon Marchi
Since these files are generated by autoconf, they shouldn't be included in
SCRIPT_LIST, which is the list of scripts to copy from the source directory to the build directory. This gets rid of these warnings when building:cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_big_trace': No such file or directory
cp: cannot stat
'/home/simark/src/babeltrace/tests/lib/test_seek_empty_packet': No such file or directorySigned-off-by Simon Marchi <[email protected]>--- tests/lib/Makefile.am | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)tests/lib/Makefile.am +0
-0@@ -41,9 +41,7 @@ test_bt_values_SOURCES = test_bt_values.c test_ctf_ir_ref_SOURCES = test_ctf_ir_ref.c test_bt_ctf_field_type_validation_SOURCES =
test_bt_ctf_field_type_validation.cQuoted 9 lines
tests/lib/Makefile.am
Quoted 6 lines
tests/lib/Makefile.am +1
-3-SCRIPT_LIST = test_seek_big_trace \ - test_seek_empty_packet \ - test_ctf_writer_complete +SCRIPT_LIST = test_ctf_writer_complete EXTRA_DIST = test_seek_big_trace.in test_seek_empty_packet.in CLEANFILES= test_seek_big_trace test_seek_empty_packetSorry, forgot to mention that this series is meant for babeltrace.
Quoted 3 lines
Good catch, I reviewed the patches and I'm working on an updated version to do further cleanup of the
Makefileand test scripts generation.Ok thanks.
Just an idea: I find it quite cumbersome to add a new entry in configure.ac for each test script that we want autoconf to process (such as in patch 3/3). I think it could be easier to have a single file (e.g.
vars.sh) and have it contain definitions of various directories:srcdir=@srcdir@
top_srcdir=@top_srcdir@
abs_top_srcdir=@abs_top_srcdir@
builddir=@builddir@
...
Quoted 3 lines
This way, you could have only a single generated file (vars.sh.in ->
vars.sh), and each test script would just have to source that file to use the values.
Indeed, good idea.
Regards,
Jérémie
Quoted 5 lines
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 7 lines
Jérémie Galarneau EfficiOS Inc. http://www.efficios.com _______________________________________________ lttng-dev mailing list [email protected] https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [PATCH 1/3] tests/lib/Makefile.am: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
In reply to a message not in the archiveQuoted 14 lines · ----- On Apr 28, 2016, at 12:44 PM, Simon Marchi [email protected] wrote:
Ok thanks.
Just an idea: I find it quite cumbersome to add a new entry in configure.ac for each test script that we want autoconf to process (such as in patch 3/3). I think it could be easier to have a single file (e.g.
vars.sh) and have it contain definitions of various directories:srcdir=@srcdir@
top_srcdir=@top_srcdir@
abs_top_srcdir=@abs_top_srcdir@
builddir=@builddir@
...
Quoted 3 lines
This way, you could have only a single generated file (vars.sh.in ->
vars.sh), and each test script would just have to source that file to use the values.
As discussed on #lttng, here is the PR resulting from my updates to your patches :
https://github.com/efficios/babeltrace/pull/43
Concerning the include file, I'm not convinced it would be simpler, we would end up with static scripts in the source dir including a generated file in the builddir.
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Re: [PATCH 1/3] tests/lib/Makefile.am: Remove test_seek_empty_packet and test_seek_big_trace from SCRIPT_LIST
In reply to a message not in the archiveQuoted 16 lines · Michael Jeanson
----- On Apr 28, 2016, at 12:44 PM, Simon Marchi
Quoted 14 lines · [email protected] wrote:
Ok thanks.
Just an idea: I find it quite cumbersome to add a new entry in configure.ac for each test script that we want autoconf to process (such as in patch 3/3). I think it could be easier to have a single file (e.g.
vars.sh) and have it contain definitions of various directories:srcdir=@srcdir@
top_srcdir=@top_srcdir@
abs_top_srcdir=@abs_top_srcdir@
builddir=@builddir@
...
Quoted 8 lines
Quoted 3 lines
This way, you could have only a single generated file (vars.sh.in ->
vars.sh), and each test script would just have to source that file to use the values.As discussed on #lttng, here is the PR resulting from my updates to your patches :
Thanks for following up.
Quoted 3 lines
Concerning the include file, I'm not convinced it would be simpler, we would end up with static scripts in the source dir including a generated file in the builddir.
In the current state, even the static scripts are copied to the build dir, so it wouldn't be a problem. Anyway, if it's not a problem, I think it looks good in your PR.
_______________________________________________
lttng-dev mailing list
[email protected]
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev