tests: remove CR characters from expected file in test_live
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 1 Oct 2019 22:21:54 +0000 (18:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 3 Oct 2019 14:45:11 +0000 (10:45 -0400)
commitda1375faf157c03995f32c8503dc6d9bedb0d309
tree741c93dc4da29853afe6d8fa4f5eb75a275d24dd
parent10b3a222a8ef74029f6b4d05818437ba0de743d6
tests: remove CR characters from expected file in test_live

Tests done by test_compare_to_ctf_fs in test_live don't work on Windows.
When comparing the expected and actual files, the expected file has CRLF
end of lines while the actual file has LF end of lines.  This can be
unexpected, as both are produced by sink.text.details.

The reason is that bt_diff strips CR characters from the actual file.
This is done so actual files match the expect files, which typically are
static (not generated) and don't contain CR characters.

This patch makes test_live also strip CR characters from the expected
files it generates.

One might wonder, why not just make bt_diff strip both files of their CR
characters.  I prefer not to do that, because most files passed as
"expect" files to that function are files from the source tree.  These
files should not be modified by building and testing.  In other words,
it should be possible to run a make check while the source tree is on a
read-only filesystem.

Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: Ie5fac78260e5bb8102d3c7f9cc3b4a1b21cf773d
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2114
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
tests/plugins/src.ctf.lttng-live/test_live
tests/utils/utils.sh
This page took 0.02426 seconds and 4 git commands to generate.