Index: tests/pybin/tools.py
===================================================================
--- tests/pybin/tools.py	(revision d9d8b9f16a782f3166b257d8294676423490ec7f)
+++ tests/pybin/tools.py	(revision 9cd44ba7ee71adceb1ca2fbafbd9671e27f4d479)
@@ -290,5 +290,5 @@
 ################################################################################
 # count number of jobs to create
-def job_count( options, tests ):
+def job_count( options ):
 	# check if the user already passed in a number of jobs for multi-threading
 	if not options.jobs:
@@ -317,5 +317,5 @@
 		sys.exit(1)
 
-	return min( options.jobs, len(tests) ), force
+	return options.jobs, force
 
 # enable core dumps for all the test children
Index: tests/test.py
===================================================================
--- tests/test.py	(revision d9d8b9f16a782f3166b257d8294676423490ec7f)
+++ tests/test.py	(revision 9cd44ba7ee71adceb1ca2fbafbd9671e27f4d479)
@@ -418,4 +418,7 @@
 				print('WARNING: test "{}" has empty .expect file'.format(t.target()), file=sys.stderr)
 
+	options.jobs, forceJobs = job_count( options )
+	settings.update_make_cmd(forceJobs, options.jobs)
+
 	# for each build configurations, run the test
 	with Timed() as total_dur:
@@ -430,9 +433,8 @@
 			local_tests = settings.ast.filter( tests )
 			local_tests = settings.arch.filter( local_tests )
-			options.jobs, forceJobs = job_count( options, local_tests )
-			settings.update_make_cmd(forceJobs, options.jobs)
 
 			# check the build configuration works
 			settings.validate()
+			jobs = min(options.jobs, len(local_tests))
 
 			# print configuration
@@ -440,5 +442,5 @@
 				'Regenerating' if settings.generating else 'Running',
 				len(local_tests),
-				options.jobs,
+				jobs,
 				settings.ast.string,
 				settings.arch.string,
@@ -450,5 +452,5 @@
 
 			# otherwise run all tests and make sure to return the correct error code
-			failed = run_tests(local_tests, options.jobs)
+			failed = run_tests(local_tests, jobs)
 			if failed:
 				if not settings.continue_:
