3 # BIN_PATH should be specified by the caller
21 TOTAL=`grep TESTS $NAME | sed 's/.*TESTS//'`
24 # Each test may have multiple variants.
26 for NUMBER in `echo $TOTAL`
29 BASE=`echo $NAME | sed 's,.*/,,'`
32 # Add the name of the test, and the variant to the request
34 echo "Test-Name = \"$BASE\"," >> .request
35 echo 'Test-Number = ' $NUMBER >> .request
37 mv .request .cache/$BASE:$NUMBER
41 echo "Running tests..."
43 (cd .cache;ls -1 > ../.foo)
47 echo "-f .cache/$x" >> .bar
50 $BIN_PATH/radclient `cat .bar` -xFd . 127.0.0.1:$PORT auth $SECRET > radclient.log 2>&1
51 if [ "$?" != "0" ]; then
52 echo "Failed running $BIN_PATH/radclient"
58 RESULT=`egrep ^\\.cache/$x radclient.log | sed 's/.* //'`
59 if [ "$RESULT" = "2" ]; then
70 rm -f radiusd.log radclient.log
71 echo "All tests succeeded"
73 echo "See radclient.log for more details"