The changes in commit d9cec8ad (CPack/RPM: Generate source rpm (SRPM)
packages on demand, 2016-09-19) logically conflict with the
infrastructure updates in commit 4682b42b (Tests: Add subtest support to
RunCMake/CPack infrastructure, 2016-09-13). Integrate the two changes
so they work together.
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.