aboutsummaryrefslogtreecommitdiff
path: root/tests/functional_tests/util_resources.py
diff options
context:
space:
mode:
authormj-xmr <mjxmr@protonmail.com>2021-04-26 19:30:28 +0200
committermj-xmr <mjxmr@protonmail.com>2021-04-27 06:21:02 +0200
commit6799e212ccd3421447761b662ac89afe6f54535b (patch)
tree6c8148dcf8a5dbe7cbce6c5fc9415568902b12ed /tests/functional_tests/util_resources.py
parentMerge pull request #7669 (diff)
downloadmonero-6799e212ccd3421447761b662ac89afe6f54535b.tar.xz
Tests: Mining test uses a parametric path for finding the calculation app
MINING_SILENT and MINING_NO_MEASUREMENT env vars
Diffstat (limited to 'tests/functional_tests/util_resources.py')
-rwxr-xr-xtests/functional_tests/util_resources.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/functional_tests/util_resources.py b/tests/functional_tests/util_resources.py
index e45122e66..0ea96c129 100755
--- a/tests/functional_tests/util_resources.py
+++ b/tests/functional_tests/util_resources.py
@@ -43,8 +43,8 @@ def available_ram_gb():
ram_gb = ram_bytes / kilo**3
return ram_gb
-def get_time_pi_seconds(cores):
- app_path = './cpu_power_test'
+def get_time_pi_seconds(cores, app_dir='.'):
+ app_path = '{}/cpu_power_test'.format(app_dir)
time_calc = subprocess.check_output([app_path, str(cores)])
decoded = time_calc.decode('utf-8')
miliseconds = int(decoded)