-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print all CTS outputs (from gtest) in CI.
- Loading branch information
Showing
3 changed files
with
41 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
""" | ||
Copyright (C) 2023 Intel Corporation | ||
Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions. | ||
See LICENSE.TXT | ||
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
""" | ||
# Print conformance test output from gtest, which is captured by the cts_exe.py script. | ||
|
||
import os | ||
import sys | ||
|
||
def print_file_content(folder_path, conformance_folder): | ||
file_path = os.path.join(folder_path, "output.txt") | ||
print(f"#### {conformance_folder} ####") | ||
|
||
if os.path.isfile(file_path): | ||
with open(file_path, "r") as file: | ||
print(file.read()) | ||
else: | ||
print(f"Warning: File {file_path} does not exist.") | ||
|
||
if __name__ == '__main__': | ||
build_dir = sys.argv[1] | ||
conformance_path = os.path.join(build_dir, "test/conformance/") | ||
|
||
# Folder expected not to have CTS output. We expect output for all CTS binaries. | ||
exclude_folders = ["CmakeFiles", "testing"] | ||
|
||
for conformance_folder in os.listdir(conformance_path): | ||
if conformance_folder not in exclude_folders: | ||
folder_path = os.path.join(conformance_path, conformance_folder) | ||
print_file_content(folder_path, conformance_folder) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters