acfl: add post-installation check by running examples (#34172)

This commit is contained in:
Annop Wongwathanarat 2022-12-01 16:47:59 +00:00 committed by GitHub
parent 6602780657
commit dfa00f5a8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -276,3 +276,12 @@ def setup_run_environment(self, env):
env.prepend_path("PATH", join_path(arm_dir, "bin"))
env.prepend_path("CPATH", join_path(arm_dir, "include"))
env.prepend_path("MANPATH", join_path(arm_dir, "share", "man"))
@run_after("install")
def check_install(self):
armpl_dir = get_armpl_prefix(self.spec)
armpl_example_dir = join_path(armpl_dir, "examples")
# run example makefile
make("-C", armpl_example_dir, "CC=" + self.cc, "F90=" + self.fortran)
# clean up
make("-C", armpl_example_dir, "clean")