1#!/usr/bin/env sh 2 3# System Integrity Protection on Darwin complicated these matters somewhat. 4# See https://github.com/google/re2/issues/175 for details. 5if [ "x$1" = "x-shared-library-path" ]; then 6 if [ "x$(uname)" = "xDarwin" ]; then 7 DYLD_LIBRARY_PATH="$2:$DYLD_LIBRARY_PATH" 8 export DYLD_LIBRARY_PATH 9 else 10 LD_LIBRARY_PATH="$2:$LD_LIBRARY_PATH" 11 export LD_LIBRARY_PATH 12 fi 13 shift 2 14fi 15 16success=true 17for i; do 18 printf "%-40s" $i 19 if $($i >$i.log 2>&1) 2>/dev/null; then 20 echo PASS 21 else 22 echo FAIL';' output in $i.log 23 success=false 24 fi 25done 26 27if $success; then 28 echo 'ALL TESTS PASSED.' 29 exit 0 30else 31 echo 'TESTS FAILED.' 32 exit 1 33fi 34