You've already forked ada_language_server
mirror of
https://github.com/AdaCore/ada_language_server.git
synced 2026-02-12 12:45:50 -08:00
Print a diff in stdout and log the full output in out/new/*.log Add a switch failed_out for dev usage, by default it's set to "diff" eng/ide/ada_language_server#1161
25 lines
648 B
Python
Executable File
25 lines
648 B
Python
Executable File
#!/usr/bin/env python
|
|
import testsuite
|
|
import os
|
|
import sys
|
|
|
|
if __name__ == '__main__':
|
|
suite = testsuite.ALSTestsuite(os.path.dirname(__file__))
|
|
result = suite.testsuite_main()
|
|
index = suite.report_index
|
|
# Print the results that are not OK
|
|
all_ok = True
|
|
for k in suite.results:
|
|
entry = index.entries[k]
|
|
status = entry.status.name
|
|
if status not in ('PASS', 'XFAIL'):
|
|
all_ok = False
|
|
print("--- {} : {} ---".format(k, status))
|
|
test_result = entry.load()
|
|
print(f"Output:\n{test_result.out}")
|
|
|
|
if all_ok:
|
|
print("SUCCESS")
|
|
|
|
sys.exit(result)
|