[1.7.x] Made runtests.py use 'set_installed_apps' API

This will also trigger the ready method of any tested application,
which was not run before.
Backport of 19b4908206 from master.