test-lib-main.sh: split initialization into generic and specific