modify test script to do Pkg.build