#! /bin/csh -f
setenv | grep LOCAL_BUILD_DIR > /dev/null
if($status != 0) then
echo Please set env var LOCAL_BUILD_DIR.
exit(1)
endif
setenv HOME "${LOCAL_BUILD_DIR}/home"
rm -rf "${LOCAL_BUILD_DIR}/home"
echo Creating virtual home directory in "$HOME"...
mkdir -p "${HOME}/Library/Preferences" || exit(1)
setenv PATH "${LOCAL_BUILD_DIR}:${PATH}"
set USERNAME=`whoami`
if($USERNAME == root) then
set LOGIN_KEYCHAIN="${LOCAL_BUILD_DIR}/home/Library/Keychains/login.keychain"
else
set LOGIN_KEYCHAIN=login.keychain
endif
echo Creating virtual login keychain in "$LOGIN_KEYCHAIN"...
security create -p test "$LOGIN_KEYCHAIN"
security set-keychain-settings "$LOGIN_KEYCHAIN" || exit(1)
set BUILD_DIR=$LOCAL_BUILD_DIR
set FULL_SSL=
while ( $ switch ( "$argv[1]" )
case f:
set FULL_SSL=f
shift
breaksw
default:
echo Usage: testall \[f\(ull SSL tests\)\]
exit(1)
endsw
end
if( ( ! -e $BUILD_DIR/wrapTest ) || \
( ! -e $BUILD_DIR/hashTest ) || \
( ! -e $BUILD_DIR/sslViewer ) || \
( ! -e $BUILD_DIR/threadTest) ) then
echo === You do not seem to have all of the required executables.
echo === Please run \"make all\".
exit(1)
endif
echo ===== Running raw CSP regression test =====
./cspdvt q || exit(1)
echo ===== Running CSPDL regression test =====
./cspdvt q D || exit(1)
echo ===== Running CL/TP regression test =====
cd ../clxutils; ./cltpdvt q $FULL_SSL || exit(1)
echo ===== Full CSP/CL/TP regression test SUCCEEDED =====