blob: db4eeab134fc53932204e61faffcfbbcb65602a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
from collections import namedtuple
import pytest
# This provides a way to run a quick smoke test run for PRs, a more exhaustive set
# of tests for nightly runs, and long running tests for stress tests over the weekend
#
# smoke: subset of tests, short duration
# full: all test cases, short duration
# stress: subset of tests, long duration
Test_Length_Smoke = "smoke"
Test_Length_Full = "full"
Test_Length_Stress = "stress"
test_length_params = namedtuple('test_length_params', 'iterations duration')
def select_test_cases_by_length(test_length, test_cases):
if test_length == Test_Length_Full:
return [test_case[1] for test_case in test_cases]
else:
return [test_case[1] for test_case in test_cases if test_length in test_case[0]]
|