ctest: refactor some code
While reading through the ctest sources I saw some easy to cleanup code.
A GitLab update will be applied on April 24th, between 8am and 10am, EST (UTC-05:00). This site may have intermittent delays during that time.
While reading through the ctest sources I saw some easy to cleanup code.