Overview
PTL's create_import_hook(), by default, prints hook's content in the test output. This is a useful information in the test output. But in scenarios where the hook body is very large, (For example cgroups hook with 4500+ lines) the test output becomes unmanageable. Hence an option will be added to create_import_hook() and import_hook() methods to suppress logging hook body, if needed. Test writers can choose to suppress hook contents if needed.
Forum Discussion
Interface updates
In fw/ptl/lib/pbs_testlib.py,
Interface: create_import_hook(self, name, attrs=None, body=None, overwrite=True, logbody=True)
Synopsis: Added a new boolean parameter 'logbody'
Details: Default value for logbody is True.
- Interface: import_hook(self, name, body, logbody=True)
Synopsis: Added a new boolean parameter 'logbody'
Details: Default value for logbody is True.
Hook body will be printed in the test output by default. Test writers can choose to set logbody param to 'False' in create_import_hook() and import_hook() methods when dealing with hooks with large body.
Project Documentation Main Page