Skip to content

Commit

Permalink
[forge] change test result reply on report instead of pod state
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonccccc authored and bors-libra committed Oct 5, 2021
1 parent debb913 commit 313edd1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/fgi/run
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ print(
)
print("**********\n")

test_res = 'failed'
if args.report:
# perf report
test_report = []
Expand All @@ -244,6 +245,7 @@ if args.report:
if read_lines:
test_report.append(line)
if 'json-report-begin' in line: read_lines = True
if 'test result: ok' in line: test_res = 'passed'
if len(test_report) == 0:
test_report.append("{\"text\": \"Forge test runner is terminated\"}")
temp = json.loads(''.join(test_report))
Expand All @@ -256,6 +258,9 @@ if args.report:
if "failed" in job_status and job_status["failed"] == 1:
print()
print(f"{FAIL}Job {job_name} failed{RESTORE}")
sys.exit(1)
else:
print(f"{OKGREEN}Job {job_name} succeeded!{RESTORE}")


print(f"{OKGREEN}Job {job_name} succeeded!{RESTORE}")
if test_res == 'failed':
exit(1)

0 comments on commit 313edd1

Please sign in to comment.