/
PP-1278: Need a skip decorator in PTL which will skip the test without any condition.
PP-1278: Need a skip decorator in PTL which will skip the test without any condition.
Description:
Currently in PTL we don't have any decorator which will skip the testcase irrespective of any condition. We need such decorator, so that without adding any skip code inside the testcase, we can skip the testcase in any condition just by applying it.
Interface: @skip(reason=<reason_for_skip>)
Visibility: Public
Change Control: Stable
Synopsis: New interface to skip the testcase without any skip condition.
Details: This interface will provide user a way to skip a particular testcase with the reason and irrespective of any skip condition.
- This interface takes one parameter called 'reason'.
- If '@skip' is applied over a testcase then:
- Call 'skip()' function defined inside 'utils/pbs_testsuite.py'.
- Define a wrapper inside 'skip()' which will set unittest skip flag(__unittest_skip__) and skip reason (__unittest_skip_why__) .
- Return the wrapper function.
- Unittest run method will skip the testcase setUp() and execution with the reason passed.
- Example:
Skip test test_t1:
@skip(reason="Skipping this test due to <issue_id>")
def test_t1:
.
.
Skip the complete testsuite:
@skip(reason="Skipping this testsuite due to <issue_id>")
class SmokeTest():
.
.
, multiple selections available,
Related content
PP-519: Modify skipOnCray decorator in PTL to skip test on Cray, Cray ALPS simulator and Cray build
PP-519: Modify skipOnCray decorator in PTL to skip test on Cray, Cray ALPS simulator and Cray build
More like this
PTL Test Structures and Conventions
PTL Test Structures and Conventions
More like this
PP-239 and PP-659: Decorator to skip PTL tests on cpuset mom; Specifying default test case time out value while running PTL tests
PP-239 and PP-659: Decorator to skip PTL tests on cpuset mom; Specifying default test case time out value while running PTL tests
More like this
Using Tags in PTL
Using Tags in PTL
More like this
PP-1281: New decorator in PTL using which user can provide cluster information required for a test.
PP-1281: New decorator in PTL using which user can provide cluster information required for a test.
More like this
Design for a supported way to change default setup in PTL
Design for a supported way to change default setup in PTL
More like this