update build.xml, improve test scripts