Index: src/tests/test.py
===================================================================
--- src/tests/test.py	(revision b9da958543715a012aa064957559bd6daf3afa63)
+++ src/tests/test.py	(revision dd226e352c29d5c532c8a9fc0ebd7042831afc2b)
@@ -78,9 +78,4 @@
 			else :
 				print('ERROR: No expected file for test %s, ignoring it' % testname, file=sys.stderr)
-
-	# make sure we have at least some test to run
-	if not tests :
-		print('ERROR: No valid test to run', file=sys.stderr)
-		sys.exit(1)
 
 	return tests
@@ -266,4 +261,10 @@
 		tests = validTests( options )
 
+	# make sure we have at least some test to run
+	if not tests :
+		print('ERROR: No valid test to run', file=sys.stderr)
+		sys.exit(1)
+
+
 	# sort the test alphabetically for convenience
 	tests.sort(key=lambda t: (t.arch if t.arch else '') + t.target())
