[tests] Infer test name from first test source file

This also fixes a bug in
	 source = test_dict['source'][0]
so the source(s) used for the test was always only the first source
file. I did/does not matter, as we do not have tests that span
multiple source files (and I am not sure if we ever will have).
50 jobs for test-fixes in 18 minutes and 35 seconds (queued for 3 seconds)