19 TOTAL=`grep TESTS $NAME | sed 's/.*TESTS//'`
22 # Each test may have multiple variants.
24 for NUMBER in `echo $TOTAL`
27 BASE=`echo $NAME | sed 's,.*/,,'`
30 # Add the name of the test, and the variant to the request
32 echo "Test-Name = \"$BASE\"," >> .request
33 echo 'Test-Number = ' $NUMBER >> .request
35 mv .request .cache/$BASE:$NUMBER
39 echo "Running tests..."
41 (cd .cache;ls -1 > ../.foo)
45 echo "-f .cache/$x" >> .bar
48 $BIN_PATH/radclient `cat .bar` -xF -D ./ 127.0.0.1:$PORT auth $SECRET > ./radclient.log 2>&1
49 if [ "$?" != "0" ]; then
50 echo "Failed running $BIN_PATH/radclient"
57 RESULT=`egrep ^\\.cache/$x radclient.log | sed 's/.* //'`
58 if [ "$RESULT" = "2" ]; then
69 rm -f radiusd.log radclient.log
70 echo "All tests succeeded"
72 echo "See radclient.log for more details"