test: Wait for the jobs to stop before continuing.

Signed-off-by: Blaž Hrastnik <blaz.hrast@gmail.com>