Use the run_cmake() function to generate the test build tree with the proper CMake generator and also to verify that it succeeds. Drop our PreTestError helper as it is no longer needed.
Add script structure for easier addition of new CPack related tests.