aboutsummaryrefslogtreecommitdiffstats
path: root/test/cpu_config.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-05-31 16:08:53 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2022-02-17 18:02:35 +0000
commitb23ffd7ef216463c35b75c831e6a27e58971f4ec (patch)
tree84983bd698b2b3da6c6278e870ef978f69dbda43 /test/cpu_config.py
parent8ccc6b350703d3390633636d2b1c2f578f37cb21 (diff)
tests: make tests less make dependent
Implement command line argument parsing instead of passing arguments via environment variables. Add script for running tests without having to invoke make. Deprecate running tests via make. Type: improvement Change-Id: I2e3054a61a2ae25d460e9be00be7d7705fbf943e Signed-off-by: Klement Sekera <ksekera@cisco.com> Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'test/cpu_config.py')
-rw-r--r--test/cpu_config.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/test/cpu_config.py b/test/cpu_config.py
deleted file mode 100644
index b4e5d1ab767..00000000000
--- a/test/cpu_config.py
+++ /dev/null
@@ -1,21 +0,0 @@
-import os
-import psutil
-
-available_cpus = psutil.Process().cpu_affinity()
-num_cpus = len(available_cpus)
-
-max_vpp_cpus = os.getenv("MAX_VPP_CPUS", "auto").lower()
-
-if max_vpp_cpus == "auto":
- max_vpp_cpus = num_cpus
-else:
- try:
- max_vpp_cpus = int(max_vpp_cpus)
- except ValueError as e:
- raise ValueError("Invalid MAX_VPP_CPUS value specified, valid "
- "values are a positive integer or 'auto'") from e
- if max_vpp_cpus <= 0:
- raise ValueError("Invalid MAX_VPP_CPUS value specified, valid "
- "values are a positive integer or 'auto'")
- if max_vpp_cpus > num_cpus:
- max_vpp_cpus = num_cpus