diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2017-07-28 16:46:36 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-08-01 13:58:05 +1000 |
commit | 8ce2d051af1e3db42bdde3647c29631810d62c5a (patch) | |
tree | 1a99cf42a3e0b5ef25d98eb1e29fa22329fecebb /external/test | |
parent | bd692075e6ed6deb85bc33ca54bac4493681b907 (diff) | |
download | skiboot-8ce2d051af1e3db42bdde3647c29631810d62c5a.zip skiboot-8ce2d051af1e3db42bdde3647c29631810d62c5a.tar.gz skiboot-8ce2d051af1e3db42bdde3647c29631810d62c5a.tar.bz2 |
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-x | external/test/test.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/external/test/test.sh b/external/test/test.sh index f63cce5..c3bbc61 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 |