[CVP] Added option to pytest to show skip reasons
Added -rs option to pytest run for CVP pipelines to see
the reasons of skipped tests.
Change-Id: I4b9c4ed48e67a04509eda774a59dc4e3c71d7e4f
Closes-Bug: PROD-33744
diff --git a/src/com/mirantis/mcp/Validate.groovy b/src/com/mirantis/mcp/Validate.groovy
index 4d74114..0c90320 100644
--- a/src/com/mirantis/mcp/Validate.groovy
+++ b/src/com/mirantis/mcp/Validate.groovy
@@ -291,7 +291,7 @@
}
}
def script = ". ${env.WORKSPACE}/venv/bin/activate; ${settings}" +
- "pytest --junitxml ${output_dir}cvp_sanity.xml --tb=short -sv ${env.WORKSPACE}/cvp-sanity-checks/cvp_checks/tests/${test_set}"
+ "pytest --junitxml ${output_dir}cvp_sanity.xml --tb=short -rs -sv ${env.WORKSPACE}/cvp-sanity-checks/cvp_checks/tests/${test_set}"
withEnv(["SALT_USERNAME=${username}", "SALT_PASSWORD=${password}", "SALT_URL=${salt_url}"]) {
def statusCode = sh script:script, returnStatus:true
}
@@ -362,7 +362,7 @@
}
}
def script = ". ${env.WORKSPACE}/venv/bin/activate; ${settings}" +
- "pytest --junitxml ${output_dir}report.xml --tb=short -sv ${env.WORKSPACE}/${test_set}"
+ "pytest --junitxml ${output_dir}report.xml --tb=short -rs -sv ${env.WORKSPACE}/${test_set}"
withEnv(["SALT_USERNAME=${username}", "SALT_PASSWORD=${password}", "SALT_URL=${salt_url}"]) {
def statusCode = sh script:script, returnStatus:true
}