improve test_all for batch systems