From f24d6561a842baffbce9ddcdc9802b98f5fa2af0 Mon Sep 17 00:00:00 2001 From: Matthew Crymble Date: Mon, 15 Nov 2021 14:57:07 -0600 Subject: tests: add automated streaming tests --- host/tests/pytests/test_length_utils.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 host/tests/pytests/test_length_utils.py (limited to 'host/tests/pytests/test_length_utils.py') 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 -- cgit v1.2.3