Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 0 additions & 111 deletions test/xpu/run_test_with_only.py

This file was deleted.

32 changes: 19 additions & 13 deletions test/xpu/run_test_with_skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
default="selected",
help="Test cases scope",
)
# Add skip-cases parameter to import window skip dictionary
parser.add_argument(
"--skip-cases",
action="store_true",
default=False,
help="Use window skip dictionary for test cases",
)
args = parser.parse_args()


Expand All @@ -38,18 +31,24 @@ def should_skip_entire_file(skip_list):
return any(item.endswith(".py::") for item in skip_list)


# Import window skip dictionary if skip-cases is True
if args.skip_cases:
platform = sys.platform
print(f"Running test on the platform: {platform}")
# Import window skip dictionary if Platform is Windows
if platform.startswith("win"):
try:
# Import the window skip dictionary module
from window_skip_dict import skip_dict as window_skip_dict
from windows_skip_dict import skip_dict as window_skip_dict

# Merge the window skip dictionary with the default one using intelligent strategy
merged_skip_dict = {}

# First, copy all keys from default skip_dict
for key in skip_dict:
merged_skip_dict[key] = skip_dict[key].copy() if skip_dict[key] else []
merged_skip_dict[key] = (
list(skip_dict[key])
if isinstance(skip_dict[key], tuple)
else (skip_dict[key].copy() if skip_dict[key] else [])
)

# Then merge with window_skip_dict using intelligent strategy
for key in window_skip_dict:
Expand All @@ -61,9 +60,12 @@ def should_skip_entire_file(skip_list):
# Intelligent merge strategy:
if should_skip_entire_file(window_skip_list):
# If Windows wants to skip entire file, use ONLY Windows skip list
merged_skip_dict[key] = window_skip_list
window_skip_entire_file_list = [
item.replace("::", "") for item in window_skip_list
]
merged_skip_dict[key] = window_skip_entire_file_list
print(
f"Windows entire file skip detected for {key}, using: {window_skip_list}"
f"Windows entire file skip detected for {key}, using: {window_skip_entire_file_list}"
)
else:
# Otherwise, merge both lists and remove duplicates
Expand Down Expand Up @@ -112,6 +114,10 @@ def should_skip_entire_file(skip_list):
skip_list = None
# For "selected" case, use the skip_list as is

# If skip_list is empty, set it to None
if skip_list is not None and len(skip_list) == 0:
skip_list = None

print(f"Running test case: {key}")
if skip_list:
print(f"Skip list: {skip_list}")
Expand Down
2 changes: 1 addition & 1 deletion test/xpu/skip_list_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
# CUDA specific case
"test_cufft_plan_cache_xpu_float64",
),
"test_decomp.py": (
"test_decomp_xpu.py": (
# AssertionError: Tensor-likes are not close! ; Exception: Tensor-likes are not close!
"test_comprehensive_baddbmm_xpu_float64",
"test_comprehensive_logspace_tensor_overload_xpu_int16",
Expand Down
Loading
Loading