netpbm: run custom test command (#31072)

* netpbm: run custom test command

* fix styles

* change method name
This commit is contained in:
Qian Jianhua 2022-06-14 02:26:54 +08:00 committed by GitHub
parent 3c0a98c5ab
commit 874b713edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,6 +170,15 @@ def edit(self, spec, prefix):
def build(self, spec, prefix):
make()
if self.run_tests:
# Don't run the default command 'make check' for test
self.build_time_test_callbacks = []
@run_after('build')
@on_package_attributes(run_tests=True)
def make_check_tree(self):
# Run custom test command 'make check-tree'
make('check-tree')
def install(self, spec, prefix):
bdir = join_path(self.build_directory, 'build')