about summary refs log tree commit homepage
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-11-15 15:28:44 -0800
committerEric Wong <normalperson@yhbt.net>2011-11-15 15:28:44 -0800
commitc4c880c5a2ac521d4a6d0bad132d38dfff375a6c (patch)
treebc3ddac6436fc15ece7bd72bd15bafaa12779f4b /t/test-lib.sh
parent2fd5910969419c17aa6a31fb2119eb47a121d497 (diff)
downloadunicorn-c4c880c5a2ac521d4a6d0bad132d38dfff375a6c.tar.gz
The output of SHA1 command-line tools is too unstable and
I'm more comfortable with Ruby 1.9 encoding support than
I was in 2009.

Jeremy Evans noted the output of "openssl sha1" has
changed since I last used it.
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 7b4a365..cab2cc3 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -100,11 +100,5 @@ unicorn_wait_start () {
 }
 
 rsha1 () {
-        _cmd="$(which sha1sum 2>/dev/null || :)"
-        test -n "$_cmd" || _cmd="$(which openssl 2>/dev/null || :) sha1"
-        test "$_cmd" != " sha1" || _cmd="$(which gsha1sum 2>/dev/null || :)"
-
-        # last resort, see comments in sha1sum.rb for reasoning
-        test -n "$_cmd" || _cmd=sha1sum.rb
-        expr "$($_cmd)" : '\([a-f0-9]\{40\}\)'
+        sha1sum.rb
 }