diff options
author | Jeff Darcy <jdarcy@redhat.com> | 2012-10-23 09:18:52 -0400 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-19 22:38:44 -0800 |
commit | c0885f7dbbbf8fb9d9f813617e13c7ba59a6acef (patch) | |
tree | 59509f6c6057905ece1369faf7a5454bcd3f8322 /tests/include.rc | |
parent | f90ca96f540ce1765ae25baea6205f998b005035 (diff) |
tests: make _EXPECT handle more cases
First issue is that _EXPECT wasn't handling args with spaces correctly. This
was fixed by enclosing the entire expected-value expression in double quotes
with a simple backslash escape for the end-of-line dollar sign.
Second issue is that we were throwing away potentially useful debug
information. Fixed by using egrep's -q option to suppress output, and
eliminating redirections so that we can see any stderr output related to a
script error.
Change-Id: Ide3f49558dcece55bd90cad50b1ffc572592f11c
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4126
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/include.rc')
-rw-r--r-- | tests/include.rc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/include.rc b/tests/include.rc index bc9784cf49b..585a4e2c885 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -56,7 +56,7 @@ function _EXPECT() e="$1"; shift; - "$@" | tail -1 | egrep '^'${e}'$' >/dev/null 2>&1; + "$@" | tail -1 | egrep -q "^${e}\$" test_footer; } |