add self-test and update build.xml