|
15 | 15 | # Get commit SHA from command line argument or environment variable
|
16 | 16 | commit_sha = None
|
17 | 17 | if len(sys.argv) < 2 or len(sys.argv) > 3:
|
18 |
| - print("Usage: python table_generator.py <test_results.json> [commit_sha]") |
| 18 | + print("Usage: python table_generator.py <test_results.json> [commit_sha]", file=sys.stderr) |
19 | 19 | sys.exit(1)
|
20 | 20 | elif len(sys.argv) == 3: # Commit SHA is provided as argument
|
21 | 21 | commit_sha = sys.argv[2]
|
22 | 22 | elif "GITHUB_SHA" in os.environ: # Commit SHA is provided as environment variable
|
23 | 23 | commit_sha = os.environ["GITHUB_SHA"]
|
24 | 24 | else: # Commit SHA is not provided
|
25 |
| - print("Commit SHA is not provided. Please provide it as an argument or set the GITHUB_SHA environment variable.") |
| 25 | + print("Commit SHA is not provided. Please provide it as an argument or set the GITHUB_SHA environment variable.", file=sys.stderr) |
26 | 26 | sys.exit(1)
|
27 | 27 |
|
28 | 28 | # Generate the table
|
|
41 | 41 | pass
|
42 | 42 |
|
43 | 43 | print("### Validation Tests")
|
44 |
| -print("") |
45 | 44 |
|
46 | 45 | proc_test_data = {}
|
47 | 46 | target_list = []
|
|
76 | 75 | target_list = sorted(target_list)
|
77 | 76 |
|
78 | 77 | for platform in proc_test_data:
|
| 78 | + print("") |
79 | 79 | print(f"#### {platform.capitalize()}")
|
80 | 80 | print("")
|
81 | 81 | print("Test", end="")
|
|
127 | 127 | with open("test_results.json", "w") as f:
|
128 | 128 | json.dump(results_data, f, indent=2)
|
129 | 129 |
|
130 |
| -print(f"\nTest results saved to test_results.json") |
131 |
| -print(f"Commit SHA: {commit_sha}") |
132 |
| -print(f"Tests failed: {results_data['tests_failed']}") |
| 130 | +print(f"\nTest results saved to test_results.json", file=sys.stderr) |
| 131 | +print(f"Commit SHA: {commit_sha}", file=sys.stderr) |
| 132 | +print(f"Tests failed: {results_data['tests_failed']}", file=sys.stderr) |
0 commit comments