Testing $? always strikes me as kinda lame.  You can just apply if to the command whose $? you're testing.

if TEST_OUTPUT=`$CL`
then echo "$TEST_NAME: Success"
else # report failure
fi

should work just fine.  Similar applies below.