Index: TestRunner.sh
===================================================================
--- TestRunner.sh	(revision 67486)
+++ TestRunner.sh	(working copy)
@@ -43,11 +43,31 @@
 if [ ! -n "$CLANG" ]; then
     CLANG="clang"
 fi
+
+# Make sure $CLANG actually exists; otherwise ensuing failures are non-obvious.
+which "$CLANG" > /dev/null
+NO_CLANG=$?
+if [ $NO_CLANG -ne 0 ]; then
+  echo "Couldn't find 'clang' program, try setting CLANG in your environment"
+  exit 1
+fi
+
 if [ -n "$VG" ]; then
   rm -f $OUTPUT.vg
   CLANG="valgrind --leak-check=full --quiet --log-file=$OUTPUT.vg $CLANG"
 fi
 
+# Assume $CLANG is correct, and that 'clang-driver' can always be formed as so
+CLANGDRIVER="$CLANG-driver"
+
+# Try to sanity check $CLANGDRIVER too
+which "$CLANGDRIVER" > /dev/null
+NO_CLANGDRIVER=$?
+if [ $NO_CLANGDRIVER -ne 0 ]; then
+  echo "Couldn't find 'clang-driver' program, try setting CLANGDRIVER in your environment"
+  exit 1
+fi
+
 SCRIPT=$OUTPUT.script
 TEMPOUTPUT=$OUTPUT.tmp
 grep 'RUN:' $FILENAME | \
