tests: Improve tests script.