Skip checking samples in coverage job

TaskSampleTestCase is not quick stuff. Tests from this testcase tests
yaml/json files which are not relate to tests coverage of Rally code.
Also, coverage job launchs this slow testcase twice.
Let's use environment variable to identify job name and skip whole test
case in case of coverage job.

PS: coverage is not change in comparison with previous commit, where
    TaskSampleTestCase is launched. It is one more proof that this testcase
    doesn't have any unique calls to rally code.

Change-Id: If0925bc37198092f5d9efadb6591ced25d75212c
This commit is contained in:
Andrey Kurilin 2016-08-12 10:53:40 +03:00
parent b7af1ceb30
commit 8e7cfeba68
2 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,11 @@ class TaskSampleTestCase(test.TestCase):
os.pardir, os.pardir, os.pardir,
"samples", "tasks")
def setUp(self):
super(TaskSampleTestCase, self).setUp()
if os.environ.get("TOX_ENV_NAME") == "cover":
self.skipTest("There is no need to check samples in coverage job.")
@mock.patch("rally.task.engine.TaskEngine"
"._validate_config_semantic")
def test_schema_is_valid(self,

View File

@ -9,6 +9,7 @@ setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US:en
LC_ALL=C
PYTHONHASHSEED=0
TOX_ENV_NAME={envname}
whitelist_externals = find
rm
make