Type: User Story
Affects Version/s: None
Fix Version/s: None
Component/s: PTL Framework
While PTL test execution, a PTL test can run or can be skipped based on various conditions like platform on which it is tested, PBS code that is being tested, combination of PBS features etc.
Hence, we need an approach where the test writer gets options to specify his condition whether to run or skip the written test on combination of one or more such reasons.
One of the approaches suggested is as below:
Have a visitor pattern like “is_ok_to_run()” which is called by the framework before every PTL test is run. This needs to be defined by the test writer inside which he can specify various conditions and combinations of conditions that the result in true/false return value of is_ok_to_run() which is by default true if nothing is specified in its definition. These condition checks can be in terms of below APIs provided by the framework:
So the writer can say conditions like below to run his test:
if is_cpuset_mom() && is_power_enabled()
We need to enhance and have such a better approach instead of the current approach of skip decorators provided by PTL: skipOnCray, skipOnCpuSet, checkModule etc.