Currently, testimage will execute runqemu and wait for the image to boot even if there are no tests to run. So just check if the class is going to run tests before booting qemu to avoid waste of time and resources.
Sent patch to the mailing list: https://patchwork.openembedded.org/series/5244/
Sent patch to the mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2017-February/132496.html Patchwork: https://patchwork.openembedded.org/series/5244/
This has been solved in commit: http://cgit.openembedded.org/openembedded-core/commit/?id=8345f834a080737f03bee3f0c615dd9654401d93