virtest: prevent out-of-order build/test (#26944)

Use of `-R` flag to CTest command causes "empty-14" test to run,
by matching "empty", before the empty-14 target is built.

Patch CTest command in buildscript to match name exactly.
This commit is contained in:
Ben Morgan 2021-10-26 17:55:54 +01:00 committed by GitHub
parent 94a9733822
commit a2e5a28892
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,11 @@ class Virtest(CMakePackage):
version('master', branch='master')
def patch(self):
script = FileFilter('tests/CMakeLists.txt')
script.filter(r' *\${CMAKE_CTEST_COMMAND} -V -R \${target}',
'${CMAKE_CTEST_COMMAND} -V -R "^${target}$"')
def setup_run_environment(self, env):
env.prepend_path('CPATH', self.prefix.include.vir)