Rename deprecated mcp_qa helpers to tcp_qa
https://mirantis.jira.com/browse/PROD-11772
Change-Id: I15506ab2bff258735e086a360860d0295a416411
diff --git a/src/com/mirantis/tcp_qa/RunTest.groovy b/src/com/mirantis/tcp_qa/RunTest.groovy
new file mode 100644
index 0000000..f64dd53
--- /dev/null
+++ b/src/com/mirantis/tcp_qa/RunTest.groovy
@@ -0,0 +1,23 @@
+package com.mirantis.tcp_qa
+
+/**
+ * Run tcp-qa test by specified group
+ * @param testGroup defines what tests to run, options are '-m test_mark', '-k test_expression'
+ * @param jobSetParameters is additional params needed to run mcp-qa test
+ */
+
+def runTest(testGroup, jobSetParameters) {
+ def testArgs = [ '-s', '-ra' ]
+ testArgs.add(testGroup)
+ jobSetParameters.add("TEST_ARGS=${testArgs.join(' ')}")
+ echo("The current tags, args, which were set by job: ${jobSetParameters.join(' ')}")
+ withEnv(jobSetParameters) {
+ sh '''\
+ . ${VENV_PATH}/bin/activate
+ if ! py.test ${TEST_ARGS}; then
+ echo "Tests failed!"
+ exit 1
+ fi
+ '''.stripIndent()
+ }
+}