diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-08-10 19:56:06 +0200 |
---|---|---|
committer | Harshavardhana <harsha@harshavardhana.net> | 2014-08-20 13:42:46 -0700 |
commit | a521fc1d22db5477552c0fabc1f918b43caa50c3 (patch) | |
tree | dc0f6bded0418aade1e4417df5430fc10b578c65 | |
parent | 011b3fc4afd2cb12b8b3248df05c3870ae4cfe78 (diff) |
Regression test portability: sha1sum
Provide a shell function for sha1sum if missing
BUG: 764655
Change-Id: I8b232af8aab7f95ba7c7ad83e37a111d562201a5
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8450
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
-rw-r--r-- | tests/include.rc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/include.rc b/tests/include.rc index 2c0d14362c2..6b933b036f7 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -519,6 +519,14 @@ which md5sum > /dev/null || { } } +which sha1sum > /dev/null || { + sha1sum() { + for f in $* ; do + sha1 $f | awk -F'[() ]' '{printf("%s %s\n", $6, $3)}' + done + } +} + alias EXPECT='_EXPECT $LINENO' alias EXPECT_NOT='_EXPECT_NOT $LINENO' alias TEST='_TEST $LINENO' |