[ci] Get back testing samples
Change-Id: I7b4777fa502f2b9da5770d67947357a02b5f1ad0
This commit is contained in:
parent
1332ad7d91
commit
fcb1fb6c60
@ -87,6 +87,16 @@
|
||||
vars:
|
||||
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:
|
||||
name: rally-tox-cover
|
||||
parent: tox-cover
|
||||
|
@ -88,6 +88,7 @@
|
||||
- rally-tox-py36
|
||||
- rally-tox-py37
|
||||
- rally-tox-py38
|
||||
- rally-tox-samples
|
||||
- rally-tox-functional
|
||||
- rally-tox-functional-py38
|
||||
- rally-tox-self
|
||||
|
@ -17,8 +17,8 @@ import inspect
|
||||
import itertools
|
||||
import os
|
||||
import traceback
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import yaml
|
||||
|
||||
import rally
|
||||
@ -37,10 +37,7 @@ class TaskSampleTestCase(test.TestCase):
|
||||
|
||||
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.")
|
||||
with mock.patch("rally.api.API.check_db_revision"):
|
||||
self.rapi = api.API()
|
||||
self.rapi = api.API(skip_db_check=True)
|
||||
|
||||
def iterate_samples(self, merge_pairs=True):
|
||||
"""Iterates all task samples
|
||||
|
6
tox.ini
6
tox.ini
@ -40,6 +40,12 @@ basepython = python3.7
|
||||
[testenv:py38]
|
||||
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]
|
||||
commands = {posargs}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user