Skip to content

Refactor unit test scripts - #2148

Merged
XuehaoSun merged 11 commits into
mainfrom
xuehao/fix_cuda_ut
Aug 13, 2026
Merged

XuehaoSun merged 11 commits into
mainfrom
xuehao/fix_cuda_ut

Conversation

@XuehaoSun

Copy link
Copy Markdown
Contributor

Description

This pull request makes several improvements to the unit test infrastructure, focusing on unifying coverage configuration, simplifying test summary printing, and cleaning up test runner scripts. The main changes include switching from a .coverage config file to a .coveragerc file, replacing shell-based summary printing with a Python script, and removing unnecessary environment variables and pytest flags from the test runners.

Key changes:

Coverage configuration and environment:

  • Standardized the coverage configuration file from .coverage to .coveragerc across all test scripts and pipelines, updating all relevant COVERAGE_RCFILE environment variable assignments. (.azure-pipelines/scripts/ut/.coveragerc, .azure-pipelines/scripts/ut/collect_log.sh, .azure-pipelines/scripts/ut/run_ut.sh, .azure-pipelines/scripts/ut/run_ut_cuda.sh, .azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Test summary handling:

  • Replaced the shell-based print_summary function with a new Python script (print_summary.py) that colorizes test output and handles exit codes, improving maintainability and clarity. (.azure-pipelines/scripts/ut/print_summary.py, .azure-pipelines/scripts/ut/run_ut.sh, .azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh) [1] [2] [3]

Test runner simplifications:

  • Removed the use of the COVERAGE_CORE=sysmon environment variable and several unnecessary pytest flags (such as --disable-warnings, --durations, and --durations-min) from all test runner scripts, streamlining test execution. (.azure-pipelines/scripts/ut/run_ut.sh, .azure-pipelines/scripts/ut/run_ut_cuda.sh, .azure-pipelines/scripts/cuda_unit_test/run_cuda_ut.sh) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Test requirements and paths:

  • Fixed and standardized paths to requirements files in CUDA test runners to ensure correct package installation for all test types. (.azure-pipelines/scripts/ut/run_ut_cuda.sh) [1] [2] [3] [4] [5]

These updates make the CI scripts more maintainable, reduce duplication, and improve the clarity of test results.

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
…hon script for improved readability and maintainability

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
…llmc integration test

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
…mproved compatibility

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
…ons for improved compatibility

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
…st scripts for improved consistency

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
…alability

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@XuehaoSun
XuehaoSun marked this pull request as draft August 12, 2026 03:28
…ncy with large remote datasets

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

@n1ck-guo n1ck-guo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@XuehaoSun
XuehaoSun marked this pull request as ready for review August 13, 2026 01:53
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@XuehaoSun
XuehaoSun merged commit 506bd5f into main Aug 13, 2026
47 checks passed
@XuehaoSun
XuehaoSun deleted the xuehao/fix_cuda_ut branch August 13, 2026 03:03
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