Index: driver/cfa.cc
===================================================================
--- driver/cfa.cc	(revision 37fe3525f53534b29c07f4f1204c5f779836d193)
+++ driver/cfa.cc	(revision 28582b2f67a95666cd46d6aa6b773838c5711333)
@@ -355,6 +355,5 @@
 		libdir = string(CFA_LIBDIR) + arch + config;
 		if( !dirExists(libdir) ) {
-			cerr << argv[0] << " internal error, cannot find prelude directory." << endl;
-			cerr << "Was looking for " << libdir << endl;
+			cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl;
 			libdir = string(CFA_LIBDIR) + arch + "nolib";
 		}
Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am	(revision 37fe3525f53534b29c07f4f1204c5f779836d193)
+++ tests/Makefile.am	(revision 28582b2f67a95666cd46d6aa6b773838c5711333)
@@ -37,5 +37,6 @@
 CC = @CFACC@
 
-.PHONY : list
+.PHONY: list .validate
+.INTERMEDIATE: .validate .validate.c
 EXTRA_PROGRAMS = fstream_test avl_test # build but do not install
 
@@ -55,4 +56,10 @@
 list :
 	@+${TEST_PY} --list ${concurrent}
+
+.validate: .validate.c
+	@$(COMPILE) .validate.c -fsyntax-only
+
+.validate.c:
+	@echo "int main() { return 0; }" > ${@}
 
 concurrency :
Index: tests/Makefile.in
===================================================================
--- tests/Makefile.in	(revision 37fe3525f53534b29c07f4f1204c5f779836d193)
+++ tests/Makefile.in	(revision 28582b2f67a95666cd46d6aa6b773838c5711333)
@@ -316,5 +316,5 @@
 
 .SUFFIXES:
-.SUFFIXES: .c .o .obj
+.SUFFIXES: .c .o .obj .validate
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
@@ -614,5 +614,6 @@
 
 
-.PHONY : list
+.PHONY: list .validate
+.INTERMEDIATE: .validate .validate.c
 
 all-local :
@@ -627,4 +628,10 @@
 list :
 	@+${TEST_PY} --list ${concurrent}
+
+.validate: .validate.c
+	@$(COMPILE) .validate.c -fsyntax-only
+
+.validate.c:
+	@echo "int main() { return 0; }" > ${@}
 
 concurrency :
Index: tests/pybin/settings.py
===================================================================
--- tests/pybin/settings.py	(revision 37fe3525f53534b29c07f4f1204c5f779836d193)
+++ tests/pybin/settings.py	(revision 28582b2f67a95666cd46d6aa6b773838c5711333)
@@ -3,4 +3,5 @@
 import os
 import sys
+import tools
 
 try :
@@ -85,2 +86,14 @@
 
 	make = "make" if not force else ("make -j%i" % jobs)
+
+def validate():
+	make_ret, _ = tools.make( ".validate", error_file = ".validate.err", redirects  = "2> /dev/null 1> /dev/null", )
+	if make_ret != 0:
+		with open (".validate.err", "r") as myfile:
+			error=myfile.read()
+		print('ERROR: Invalid configuration', file=sys.stderr)
+		print("       verify returned : \n%s" % error, file=sys.stderr)
+		tools.rm("%s/.validate.err" % BUILDDIR)
+		sys.exit(1)
+
+	tools.rm("%s/.validate.err" % BUILDDIR)
Index: tests/pybin/tools.py
===================================================================
--- tests/pybin/tools.py	(revision 37fe3525f53534b29c07f4f1204c5f779836d193)
+++ tests/pybin/tools.py	(revision 28582b2f67a95666cd46d6aa6b773838c5711333)
@@ -52,17 +52,18 @@
 # Remove 1 or more files silently
 def rm( files ):
-	try:
+	if isinstance( files, basestring ):
+		sh("rm -f %s > /dev/null 2>&1" % files )
+	else:
 		for file in files:
 			sh("rm -f %s > /dev/null 2>&1" % file )
-	except TypeError:
-		sh("rm -f %s > /dev/null 2>&1" % files )
 
 # Create 1 or more directory
 def mkdir( files ):
-	try:
+	if isinstance( files, basestring ):
+		sh("mkdir -p %s" % os.path.dirname(files) )
+	else:
 		for file in files:
 			sh("mkdir -p %s" % os.path.dirname(file) )
-	except TypeError:
-		sh("mkdir -p %s" % os.path.dirname(files) )
+
 
 def chdir( dest = __main__.__file__ ):
Index: tests/test.py
===================================================================
--- tests/test.py	(revision 37fe3525f53534b29c07f4f1204c5f779836d193)
+++ tests/test.py	(revision 28582b2f67a95666cd46d6aa6b773838c5711333)
@@ -85,5 +85,5 @@
 	# create a parser with the arguments for the tests script
 	parser = argparse.ArgumentParser(description='Script which runs cforall tests')
-	parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='no')
+	parser.add_argument('--debug', help='Run all tests in debug or release', type=yes_no, default='yes')
 	parser.add_argument('--arch', help='Test for specific architecture', type=str, default='')
 	parser.add_argument('--dry-run', help='Don\'t run the tests, only output the commands', action='store_true')
@@ -285,4 +285,7 @@
 
 	else :
+		# check the build configuration works
+		settings.validate()
+
 		options.jobs, forceJobs = jobCount( options, tests )
 		settings.updateMakeCmd(forceJobs, options.jobs)
