tests: Use diff -u
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 3 Jul 2019 15:40:49 +0000 (11:40 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 3 Jul 2019 19:16:28 +0000 (15:16 -0400)
We are all more used to "unified" diff output formats than other
formats, so I suggest we use that for differences between expected and
actual results.

Change-Id: I681fcd232459eedf9c084514ca9d54be9732adcc
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1601
Reviewed-by: Jonathan Rajotte Julien <jonathan.rajotte-julien@efficios.com>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
CI-Build: Michael Jeanson <mjeanson@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
tests/utils/utils.sh

index c44e2e3ba12833e94789ab1be99831ab5b04d9bd..a66acd993f940a4e8a8185a3f9900691791682a2 100644 (file)
@@ -121,7 +121,7 @@ bt_diff_cli() {
        echo "$args" | xargs "$BT_TESTS_BT2_BIN" 2>/dev/null | tr -d "\r" > "$temp_output_file"
 
        # Compare output with expected output
-       if ! diff "$temp_output_file" "$expected_file" 2>/dev/null >"$temp_diff"; then
+       if ! diff -u "$temp_output_file" "$expected_file" 2>/dev/null >"$temp_diff"; then
                echo "ERROR: for '$args': actual and expected outputs differ:" >&2
                cat "$temp_diff" >&2
                ret=1
This page took 0.02616 seconds and 4 git commands to generate.