[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).