[ci] Get back testing samples
Change-Id: I7b4777fa502f2b9da5770d67947357a02b5f1ad0
This commit is contained in:
@@ -87,6 +87,16 @@
|
|||||||
vars:
|
vars:
|
||||||
tox_env: py38
|
tox_env: py38
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: rally-tox-samples
|
||||||
|
parent: rally-tox-base
|
||||||
|
description: |
|
||||||
|
Run unit test for rally project.
|
||||||
|
|
||||||
|
Uses tox with the ``samples`` environment.
|
||||||
|
vars:
|
||||||
|
tox_env: samples
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: rally-tox-cover
|
name: rally-tox-cover
|
||||||
parent: tox-cover
|
parent: tox-cover
|
||||||
|
|||||||
@@ -88,6 +88,7 @@
|
|||||||
- rally-tox-py36
|
- rally-tox-py36
|
||||||
- rally-tox-py37
|
- rally-tox-py37
|
||||||
- rally-tox-py38
|
- rally-tox-py38
|
||||||
|
- rally-tox-samples
|
||||||
- rally-tox-functional
|
- rally-tox-functional
|
||||||
- rally-tox-functional-py38
|
- rally-tox-functional-py38
|
||||||
- rally-tox-self
|
- rally-tox-self
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import inspect
|
|||||||
import itertools
|
import itertools
|
||||||
import os
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
import rally
|
import rally
|
||||||
@@ -37,10 +37,7 @@ class TaskSampleTestCase(test.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(TaskSampleTestCase, self).setUp()
|
super(TaskSampleTestCase, self).setUp()
|
||||||
if os.environ.get("TOX_ENV_NAME") == "cover":
|
self.rapi = api.API(skip_db_check=True)
|
||||||
self.skipTest("There is no need to check samples in coverage job.")
|
|
||||||
with mock.patch("rally.api.API.check_db_revision"):
|
|
||||||
self.rapi = api.API()
|
|
||||||
|
|
||||||
def iterate_samples(self, merge_pairs=True):
|
def iterate_samples(self, merge_pairs=True):
|
||||||
"""Iterates all task samples
|
"""Iterates all task samples
|
||||||
|
|||||||
6
tox.ini
6
tox.ini
@@ -40,6 +40,12 @@ basepython = python3.7
|
|||||||
[testenv:py38]
|
[testenv:py38]
|
||||||
basepython = python3.8
|
basepython = python3.8
|
||||||
|
|
||||||
|
[testenv:samples]
|
||||||
|
commands =
|
||||||
|
find . -type f -name "*.pyc" -delete
|
||||||
|
python {toxinidir}/tests/ci/pytest_launcher.py tests/samples --posargs={posargs}
|
||||||
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user