1#! /bin/csh -f
2#
3# Run complete performance test suite, output to stdout. No options.
4#
5# Run this from SecurityTests/cspxutils. Both cspxutils and clxutils
6# must built (and they must be peers, i.e., ../clxutils exists). 
7# Executables must be in $LOCAL_BUILD_DIR.
8#
9
10set CSPXUTILS=`pwd`
11#
12# Verify existence of a few crucial things before we start.
13#
14if ( ! -e ../clxutils) then
15	echo ../clxutils not found. Aborting.
16	exit(1)
17endif
18cd ../clxutils; set CLXUTILS=`pwd`
19#
20# safely look for this required env var
21#
22setenv | grep LOCAL_BUILD_DIR > /dev/null
23if($status != 0) then
24	echo Please set env var LOCAL_BUILD_DIR.
25	exit(1)
26endif
27set BUILD_DIR=$LOCAL_BUILD_DIR
28#
29if( ( ! -e $BUILD_DIR/perform ) || \
30    ( ! -e $BUILD_DIR/certTime) || \
31	( ! -e $CLXUTILS/certTime)) then
32	echo === You do not seem to have all of the required executables.
33	echo === Please build all of cspxutils and clxutils. 
34	echo === See the README files in those directories for info.
35	exit(1)
36endif
37#
38cd $CSPXUTILS/perform
39set cmd="./doPerform 1000 10240"
40echo $cmd
41$cmd || exit(1)
42echo ==============================================================
43cd $BUILD_DIR
44set cmd="./hashTime"
45echo $cmd
46$cmd || exit(1)
47echo ==============================================================
48cd $BUILD_DIR
49set cmd="./sigPerform a=r l=1000 k=1024"
50echo $cmd
51$cmd || exit(1)
52echo ==============================================================
53set cmd="./asymPerform k=1024"
54echo $cmd
55$cmd || exit(1)
56echo ==============================================================
57cd $CLXUTILS/certTime || exit(1)
58set cmd="./runTime"
59echo $cmd
60$cmd || exit(1)
61echo ==============================================================
62cd $CLXUTILS/kcTime || exit(1)
63set cmd="$BUILD_DIR/kcTime"
64echo $cmd
65$cmd || exit(1)
66echo ==============================================================
67cd $CLXUTILS/secTime || exit(1)
68set cmd="$BUILD_DIR/secTime"
69echo $cmd
70$cmd || exit(1)
71echo ==============================================================
72echo Performance suite complete.
73