Message ID | 1477409667-8309-1-git-send-email-nathan_lynch@mentor.com |
---|---|
Headers |
From: nathan_lynch at mentor.com (Nathan Lynch) Date: Tue, 25 Oct 2016 10:34:24 -0500 Subject: [lttng-dev] [RFC/PATCH 0/3] babeltrace: test harness improvements + new tests Message-ID: <1477409667-8309-1-git-send-email-nathan_lynch@mentor.com> |
Series |
babeltrace: test harness improvements + new tests
|
|
Message
Nathan Lynch
Oct. 25, 2016, 3:34 p.m. UTC
This is working toward moving from popt to GLib for command-line parsing. I want to add some tests for at least some of the converter command-line options in order to prevent regressions. I found it somewhat tedious to add even simple test scripts, so I investigated alternatives to doing Autoconf variable substitution, and this is what I came up with. I think it makes adding a test script quite a bit easier. It also makes the test harness more flexible at runtime, which is valuable when transferring a cross-compiled test suite to a target system for execution there. I've included the new tests I've written so far in patch #3. Nathan Lynch (3): babeltrace: use AM_TESTS_ENVIRONMENT for tests babeltrace: drop configure-time substitutions in test scripts babeltrace: add simple tests for converter command line options .gitignore | 10 ----- configure.ac | 12 ------ tests/Makefile.am | 16 ++++++++ tests/bin/Makefile.am | 3 +- tests/bin/intersection/Makefile.am | 2 +- ...{bt_python_helper.py.in => bt_python_helper.py} | 9 +++-- .../{test_intersection.in => test_intersection} | 7 +--- tests/bin/test_clock_cycles | 41 +++++++++++++++++++ tests/bin/test_clock_date | 47 ++++++++++++++++++++++ tests/bin/test_clock_seconds | 43 ++++++++++++++++++++ tests/bin/{test_formats.in => test_formats} | 9 +---- tests/bin/test_no_delta | 40 ++++++++++++++++++ ...{test_packet_seq_num.in => test_packet_seq_num} | 16 +++----- tests/bin/{test_trace_read.in => test_trace_read} | 9 +---- ...st_dwarf_complete.in => test_bin_info_complete} | 4 +- ...writer_complete.in => test_ctf_writer_complete} | 6 +-- ...st_bin_info_complete.in => test_dwarf_complete} | 4 +- ...{test_seek_big_trace.in => test_seek_big_trace} | 4 +- ...seek_empty_packet.in => test_seek_empty_packet} | 4 +- 19 files changed, 211 insertions(+), 75 deletions(-) rename tests/bin/intersection/{bt_python_helper.py.in => bt_python_helper.py} (82%) rename tests/bin/intersection/{test_intersection.in => test_intersection} (90%) mode change 100644 => 100755 create mode 100755 tests/bin/test_clock_cycles create mode 100755 tests/bin/test_clock_date create mode 100755 tests/bin/test_clock_seconds rename tests/bin/{test_formats.in => test_formats} (83%) mode change 100644 => 100755 create mode 100755 tests/bin/test_no_delta rename tests/bin/{test_packet_seq_num.in => test_packet_seq_num} (82%) mode change 100644 => 100755 rename tests/bin/{test_trace_read.in => test_trace_read} (88%) mode change 100644 => 100755 rename tests/lib/{test_dwarf_complete.in => test_bin_info_complete} (86%) rename tests/lib/{test_ctf_writer_complete.in => test_ctf_writer_complete} (79%) rename tests/lib/{test_bin_info_complete.in => test_dwarf_complete} (85%) rename tests/lib/{test_seek_big_trace.in => test_seek_big_trace} (83%) rename tests/lib/{test_seek_empty_packet.in => test_seek_empty_packet} (83%)
Comments
Hi Nathan, Simply curious On 2016-10-25 11:34 AM, Nathan Lynch wrote: > This is working toward moving from popt to GLib for command-line > parsing. What is the motivation behind this ? Cheers > I want to add some tests for at least some of the converter > command-line options in order to prevent regressions. > > I found it somewhat tedious to add even simple test scripts, so I > investigated alternatives to doing Autoconf variable substitution, and > this is what I came up with. I think it makes adding a test script > quite a bit easier. It also makes the test harness more flexible at > runtime, which is valuable when transferring a cross-compiled test > suite to a target system for execution there. > > I've included the new tests I've written so far in patch #3. > > Nathan Lynch (3): > babeltrace: use AM_TESTS_ENVIRONMENT for tests > babeltrace: drop configure-time substitutions in test scripts > babeltrace: add simple tests for converter command line options > > .gitignore | 10 ----- > configure.ac | 12 ------ > tests/Makefile.am | 16 ++++++++ > tests/bin/Makefile.am | 3 +- > tests/bin/intersection/Makefile.am | 2 +- > ...{bt_python_helper.py.in => bt_python_helper.py} | 9 +++-- > .../{test_intersection.in => test_intersection} | 7 +--- > tests/bin/test_clock_cycles | 41 +++++++++++++++++++ > tests/bin/test_clock_date | 47 ++++++++++++++++++++++ > tests/bin/test_clock_seconds | 43 ++++++++++++++++++++ > tests/bin/{test_formats.in => test_formats} | 9 +---- > tests/bin/test_no_delta | 40 ++++++++++++++++++ > ...{test_packet_seq_num.in => test_packet_seq_num} | 16 +++----- > tests/bin/{test_trace_read.in => test_trace_read} | 9 +---- > ...st_dwarf_complete.in => test_bin_info_complete} | 4 +- > ...writer_complete.in => test_ctf_writer_complete} | 6 +-- > ...st_bin_info_complete.in => test_dwarf_complete} | 4 +- > ...{test_seek_big_trace.in => test_seek_big_trace} | 4 +- > ...seek_empty_packet.in => test_seek_empty_packet} | 4 +- > 19 files changed, 211 insertions(+), 75 deletions(-) > rename tests/bin/intersection/{bt_python_helper.py.in => bt_python_helper.py} (82%) > rename tests/bin/intersection/{test_intersection.in => test_intersection} (90%) > mode change 100644 => 100755 > create mode 100755 tests/bin/test_clock_cycles > create mode 100755 tests/bin/test_clock_date > create mode 100755 tests/bin/test_clock_seconds > rename tests/bin/{test_formats.in => test_formats} (83%) > mode change 100644 => 100755 > create mode 100755 tests/bin/test_no_delta > rename tests/bin/{test_packet_seq_num.in => test_packet_seq_num} (82%) > mode change 100644 => 100755 > rename tests/bin/{test_trace_read.in => test_trace_read} (88%) > mode change 100644 => 100755 > rename tests/lib/{test_dwarf_complete.in => test_bin_info_complete} (86%) > rename tests/lib/{test_ctf_writer_complete.in => test_ctf_writer_complete} (79%) > rename tests/lib/{test_bin_info_complete.in => test_dwarf_complete} (85%) > rename tests/lib/{test_seek_big_trace.in => test_seek_big_trace} (83%) > rename tests/lib/{test_seek_empty_packet.in => test_seek_empty_packet} (83%) >
On 10/25/2016 10:50 AM, Jonathan Rajotte Julien wrote: > > On 2016-10-25 11:34 AM, Nathan Lynch wrote: >> This is working toward moving from popt to GLib for command-line >> parsing. > > What is the motivation behind this ? Babeltrace already uses GLib extensively and, as best I can tell, it doesn't do anything with command-line options that GLib doesn't support. GLib's command-line parsing facility is explicitly intended to be a replacement for popt: https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#glib-Commandline-option-parser.description I'm also working on improving Babeltrace's MinGW port and removing the popt dependency will make that easier.
On 2016-10-25 12:05, Nathan Lynch wrote: > On 10/25/2016 10:50 AM, Jonathan Rajotte Julien wrote: >> >> On 2016-10-25 11:34 AM, Nathan Lynch wrote: >>> This is working toward moving from popt to GLib for command-line >>> parsing. >> >> What is the motivation behind this ? > > Babeltrace already uses GLib extensively and, as best I can tell, it > doesn't do anything with command-line options that GLib doesn't support. > GLib's command-line parsing facility is explicitly intended to be a > replacement for popt: > > https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#glib-Commandline-option-parser.description > > I'm also working on improving Babeltrace's MinGW port and removing the > popt dependency will make that easier. You should have a look at https://github.com/mjeanson/babeltrace/commits/mingw64 Cheers, Michael
On 10/25/2016 12:43 PM, Michael Jeanson wrote: > On 2016-10-25 12:05, Nathan Lynch wrote: >> On 10/25/2016 10:50 AM, Jonathan Rajotte Julien wrote: >>> >>> On 2016-10-25 11:34 AM, Nathan Lynch wrote: >>>> This is working toward moving from popt to GLib for command-line >>>> parsing. >>> >>> What is the motivation behind this ? >> >> Babeltrace already uses GLib extensively and, as best I can tell, it >> doesn't do anything with command-line options that GLib doesn't support. >> GLib's command-line parsing facility is explicitly intended to be a >> replacement for popt: >> >> https://developer.gnome.org/glib/stable/glib-Commandline-option-parser.html#glib-Commandline-option-parser.description >> >> I'm also working on improving Babeltrace's MinGW port and removing the >> popt dependency will make that easier. > > You should have a look at > https://github.com/mjeanson/babeltrace/commits/mingw64 ah, great! I see some overlap with local changes I have already, but it looks like you've gotten further. What can I do to help this effort along?