diff options
Diffstat (limited to 'host/tests/pytests/test_length_utils.py')
-rw-r--r-- | host/tests/pytests/test_length_utils.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/host/tests/pytests/test_length_utils.py b/host/tests/pytests/test_length_utils.py new file mode 100644 index 000000000..db4eeab13 --- /dev/null +++ b/host/tests/pytests/test_length_utils.py @@ -0,0 +1,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]]
\ No newline at end of file |