Skip to content

Conversation

@libohao1201
Copy link
Contributor

disable_e2e
disable_distribute

Copilot AI review requested due to automatic review settings November 21, 2025 07:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR revises the Windows skip logic for unit tests by improving how skip lists are handled and fixing file patterns. The changes ensure empty lists are properly handled as None values and correct the file skip pattern format.

Key Changes:

  • Updated skip list validation to check for both truthiness and non-empty lists
  • Fixed the skip pattern from ".py::" to ".py" for entire file skipping
  • Added handling for None and tuple values in skip dictionary merging

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
test/xpu/xpu_test_utils.py Added length checks to skip_list and exe_list validation to ensure empty lists are treated properly
test/xpu/windows_skip_cases.py Corrected dictionary key from "test_decomp" to "test_decomp.py" and updated skip pattern format
test/xpu/run_test_with_skip.py Fixed import statement, updated file skip pattern detection, added handling for None/tuple values in skip dict, and added empty list normalization

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +44 to +49
if skip_dict[key] is None:
merged_skip_dict[key] = []
elif isinstance(skip_dict[key], tuple):
merged_skip_dict[key] = list(skip_dict[key])
else:
merged_skip_dict[key] = skip_dict[key].copy() if skip_dict[key] else []
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The nested if-elif-else logic can be simplified. When skip_dict[key] is None or falsy, all branches result in an empty list. Consider consolidating: merged_skip_dict[key] = list(skip_dict[key]) if isinstance(skip_dict[key], tuple) else (skip_dict[key].copy() if skip_dict[key] else [])

Suggested change
if skip_dict[key] is None:
merged_skip_dict[key] = []
elif isinstance(skip_dict[key], tuple):
merged_skip_dict[key] = list(skip_dict[key])
else:
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 [])

Copilot uses AI. Check for mistakes.
try:
# Import the window skip dictionary module
from window_skip_dict import skip_dict as window_skip_dict
from windows_skip_cases import skip_dict as window_skip_dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip_cases argument is for both linux and windows, right? Why import windows_skip_cases when skip_cases is true?

@chuanqi129 chuanqi129 changed the title Revise the Windows skip logic of UT [CI] Revise the Windows skip logic of UT Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants