mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 17:49:28 -05:00
functional_tests: silence the cpu power test program
it's very spammy and drowns the test output
This commit is contained in:
parent
b6a029f222
commit
ac6db928c2
@ -97,6 +97,8 @@ try:
|
|||||||
os.environ['MAKE_TEST_SIGNATURE'] = FUNCTIONAL_TESTS_DIRECTORY + '/make_test_signature'
|
os.environ['MAKE_TEST_SIGNATURE'] = FUNCTIONAL_TESTS_DIRECTORY + '/make_test_signature'
|
||||||
os.environ['SEEDHASH_EPOCH_BLOCKS'] = "8"
|
os.environ['SEEDHASH_EPOCH_BLOCKS'] = "8"
|
||||||
os.environ['SEEDHASH_EPOCH_LAG'] = "4"
|
os.environ['SEEDHASH_EPOCH_LAG'] = "4"
|
||||||
|
if not 'MINING_SILENT' in os.environ:
|
||||||
|
os.environ['MINING_SILENT'] = "1"
|
||||||
|
|
||||||
for i in range(len(command_lines)):
|
for i in range(len(command_lines)):
|
||||||
#print('Running: ' + str(command_lines[i]))
|
#print('Running: ' + str(command_lines[i]))
|
||||||
|
@ -221,7 +221,7 @@ class MiningTest():
|
|||||||
available_ram = util_resources.available_ram_gb()
|
available_ram = util_resources.available_ram_gb()
|
||||||
threshold_ram = 3
|
threshold_ram = 3
|
||||||
self.print_mining_info("Available RAM = " + str(round(available_ram, 1)) + " GB")
|
self.print_mining_info("Available RAM = " + str(round(available_ram, 1)) + " GB")
|
||||||
if available_ram < threshold_ram:
|
if available_ram < threshold_ram and not self.is_mining_silent():
|
||||||
print("Warning! Available RAM =", round(available_ram, 1),
|
print("Warning! Available RAM =", round(available_ram, 1),
|
||||||
"GB is less than the reasonable threshold =", threshold_ram,
|
"GB is less than the reasonable threshold =", threshold_ram,
|
||||||
". The RX init might exceed the calculated timeout.")
|
". The RX init might exceed the calculated timeout.")
|
||||||
@ -255,7 +255,7 @@ class MiningTest():
|
|||||||
assert res.hash == block_hash
|
assert res.hash == block_hash
|
||||||
|
|
||||||
def is_mining_silent(self):
|
def is_mining_silent(self):
|
||||||
return 'MINING_SILENT' in os.environ
|
return 'MINING_SILENT' in os.environ and os.environ['MINING_SILENT'] != "0"
|
||||||
|
|
||||||
def print_mining_info(self, msg):
|
def print_mining_info(self, msg):
|
||||||
if self.is_mining_silent():
|
if self.is_mining_silent():
|
||||||
|
Loading…
Reference in New Issue
Block a user