Use the shapes ctest writes: a not-run test with SKIP_RETURN_CODE=77 or SKIP_REGULAR_EXPRESSION_MATCHED is a skip, while a not-run test whose executable is missing ('Unable to find executable') or whose skipped element has no message is a failure that fails the run. The test fails with the previous classification.