Skip to content

Commit

Permalink
stress_tester: Print just error messages
Browse files Browse the repository at this point in the history
Change-Id: Ia9328e0d82afcc8acf5fc958735d9d3e5e59290d
  • Loading branch information
a74nh committed Apr 24, 2024
1 parent 9d75d35 commit 41e40e6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions sve_api/stress_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys

def invoke_test(env_vars, args):
print(env_vars)
print(f"------------------- {env_vars} -------------------")
# Prepare environment variables dictionary
env = {}
disable_tiering = True
Expand All @@ -23,7 +23,18 @@ def invoke_test(env_vars, args):

if 'fail' in result.stdout.lower():
print("Test failed:")
print(result.stdout)
output_batch_lines = False
for line in result.stdout.splitlines():
if 'failed:' in line:
print("..........................................")
output_batch_lines = True
if len(line.strip()) == 0:
output_batch_lines = False
print("..........................................")

if output_batch_lines or ('System.Exception' in line) or ('at ' in line.strip()):
print(line)


# Print the errors, if any
if result.stderr:
Expand Down Expand Up @@ -81,5 +92,3 @@ def invoke_test(env_vars, args):
test_legs = test_environments[mode]
for test_leg in test_legs:
invoke_test(test_leg, args)


0 comments on commit 41e40e6

Please sign in to comment.