From b23ffd7ef216463c35b75c831e6a27e58971f4ec Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 31 May 2021 16:08:53 +0200 Subject: 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 Signed-off-by: Dave Wallace --- test/cpu_config.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 test/cpu_config.py (limited to 'test/cpu_config.py') 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 -- cgit 1.2.3-korg