aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/pytests/test_length_utils.py
diff options
context:
space:
mode:
authorMatthew Crymble <matthew.crymble@ni.com>2021-11-15 14:57:07 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-11-30 07:33:28 -0800
commitf24d6561a842baffbce9ddcdc9802b98f5fa2af0 (patch)
tree977e76a8cb93844a0366612da8fae12cb693f0a9 /host/tests/pytests/test_length_utils.py
parentdf7f65d858f723fa528f6375737e73d127fa9c1b (diff)
downloaduhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.tar.gz
uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.tar.bz2
uhd-f24d6561a842baffbce9ddcdc9802b98f5fa2af0.zip
tests: add automated streaming tests
Diffstat (limited to 'host/tests/pytests/test_length_utils.py')
-rw-r--r--host/tests/pytests/test_length_utils.py20
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