fixed the build and test script when testing on fresh repository head