summaryrefslogtreecommitdiffstats
path: root/external/test
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2017-07-28 16:46:36 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-01 13:58:05 +1000
commit8ce2d051af1e3db42bdde3647c29631810d62c5a (patch)
tree1a99cf42a3e0b5ef25d98eb1e29fa22329fecebb /external/test
parentbd692075e6ed6deb85bc33ca54bac4493681b907 (diff)
downloadblackbird-skiboot-8ce2d051af1e3db42bdde3647c29631810d62c5a.tar.gz
blackbird-skiboot-8ce2d051af1e3db42bdde3647c29631810d62c5a.zip
external/pflash: Add tests
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/test')
-rwxr-xr-xexternal/test/test.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/external/test/test.sh b/external/test/test.sh
index f63cce5f..c3bbc61c 100755
--- a/external/test/test.sh
+++ b/external/test/test.sh
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright 2013-2014 IBM Corp.
+# Copyright 2013-2017 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -48,10 +48,15 @@ diff_with_result() {
fi
# Otherwise just diff result.out with stdout and result.err with stderr
else
- if ! diff -u "${RESULT}.out" "$STDOUT_OUT" ; then
+ #Strip carriage returns, useful for pflash which does fancy
+ #'progress bars'. The main reason for this is is that email
+ #doesn't barf at really really long lines
+ if ! cat "$STDOUT_OUT" | tr '\r' '\n' | \
+ diff -u "${RESULT}.out" - ; then
fail_test;
fi
- if ! diff -u "${RESULT}.err" "$STDERR_OUT" ; then
+ if ! cat "$STDERR_OUT" | tr '\r' '\n' | \
+ diff -u "${RESULT}.err" - ; then
fail_test;
fi
fi
OpenPOWER on IntegriCloud