Modify build script and tests