summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-08-30 06:59:29 +0200
committerVijay Bellur <vbellur@redhat.com>2014-08-31 22:22:04 -0700
commit11a4d37571253ce2cb18f36bb0ee18d1946be315 (patch)
treefc7d972a4d002bfa5eabf93d1cdb241e0fb25662
parent8b8f6da58926a9ae7e450021e17b0b68d9fea830 (diff)
Regression test portability: EXPECT
Make sure test_expect_not_footer() and test_expect_footer() work on non empty strings, otherwise it may produce errors such as in pgfid_feat.t on NetBSD: not ok 12 Got "" instead of "" BUG: 1129939 Change-Id: I9cb76ba863897126534c3808fb0c9e564659835f Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/8568 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--tests/include.rc12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/include.rc b/tests/include.rc
index 7f4b377f644..26f3ee73789 100644
--- a/tests/include.rc
+++ b/tests/include.rc
@@ -172,7 +172,11 @@ function _EXPECT_NOT()
shift;
a=$("$@" | tail -1)
- test_expect_not_footer "$e" "$a";
+ if [ "x$e" = "x" ] ; then
+ test_expect_not_footer "x$e" "x$a";
+ else
+ test_expect_not_footer "$e" "$a";
+ fi
}
function _EXPECT_KEYWORD()
@@ -237,7 +241,11 @@ function _EXPECT_WITHIN()
sleep 1;
done
- test_expect_footer "$e" "$a";
+ if [ "x$e" = "x" ] ; then
+ test_expect_footer "x$e" "x$a";
+ else
+ test_expect_footer "$e" "$a";
+ fi
}