TESTS: fix bugs in build farm test scripts