diff --git a/tools/confidence_test.sh b/tools/confidence_test.sh index 0a69fbb..c71d2d3 100755 --- a/tools/confidence_test.sh +++ b/tools/confidence_test.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../bin -export PATH="${blackbox_home}:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:${blackbox_home}" +export PATH="${blackbox_home}:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/local/bin:/usr/pkg/bin:/usr/pkg/gnu/bin:${blackbox_home}" export LANG=C.UTF-8 # Required ro "gpg --export" to work properly. diff --git a/tools/test_functions.sh b/tools/test_functions.sh index 68786fa..2f34800 100755 --- a/tools/test_functions.sh +++ b/tools/test_functions.sh @@ -24,6 +24,12 @@ function md5sum_file() { Darwin | FreeBSD ) md5 -r "$1" | awk '{ print $1 }' ;; + NetBSD ) + md5 -q "$1" + ;; + SunOS ) + digest -a md5 "$1" + ;; Linux ) md5sum "$1" | awk '{ print $1 }' ;; @@ -72,10 +78,10 @@ function assert_file_group() { assert_file_exists "$file" case $(uname -s) in - Darwin|FreeBSD ) + Darwin | FreeBSD | NetBSD ) found=$(stat -f '%Dg' "$file") ;; - Linux ) + Linux | SunOS ) found=$(stat -c '%g' "$file") ;; CYGWIN* ) @@ -102,11 +108,11 @@ function assert_file_perm() { assert_file_exists "$file" case $(uname -s) in - Darwin|FreeBSD ) + Darwin | FreeBSD | NetBSD ) found=$(stat -f '%Sp' "$file") ;; # NB(tlim): CYGWIN hasn't been tested. It might be more like Darwin. - Linux | CYGWIN* ) + Linux | CYGWIN* | SunOS ) found=$(stat -c '%A' "$file") ;; * )