diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py index be02685e54..1a5e69e081 100644 --- a/lib/spack/spack/build_systems/meson.py +++ b/lib/spack/spack/build_systems/meson.py @@ -209,5 +209,5 @@ def install(self, pkg, spec, prefix): def check(self): """Search Meson-generated files for the target ``test`` and run it if found.""" with fs.working_dir(self.build_directory): - self._if_ninja_target_execute("test") - self._if_ninja_target_execute("check") + self.pkg._if_ninja_target_execute("test") + self.pkg._if_ninja_target_execute("check")