Skip to content

Enhance unit tests with timeout handling and stability improvements - #2135

Open
XuehaoSun wants to merge 19 commits into
mainfrom
xuehao/timeout
Open

Enhance unit tests with timeout handling and stability improvements#2135
XuehaoSun wants to merge 19 commits into
mainfrom
xuehao/timeout

Conversation

@XuehaoSun

Copy link
Copy Markdown
Contributor

Description

This pull request updates the test infrastructure across all pipeline scripts to improve reliability, consistency, and test diagnostics. The main changes include adding the pytest-timeout package, enforcing test timeouts and session limits, collecting test duration statistics, and standardizing the use of the COVERAGE_CORE=sysmon environment variable for all test runs.

Test Infrastructure Improvements

  • Added pytest-timeout to all environments to enforce per-test and session timeouts, reducing the risk of hanging tests. [1] [2] [3] [4] [5]
  • Updated all test commands to use COVERAGE_CORE=sysmon for consistent coverage collection and environment reporting. [1] [2] [3] [4]

Test Execution Enhancements

  • Added --timeout, --session-timeout, --durations=0, and --durations-min=1 options to pytest calls to enforce time limits and collect test duration data, aiding in identifying slow tests. [1] [2] [3] [4]
  • Applied these options consistently across CPU, CUDA, HPU, and XPU test scripts, including for integration and special test suites. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Test Coverage and Logging

  • Ensured all test runs append coverage data and output logs in a consistent format, improving reporting and debugging. [1] [2] [3]
  • Extended test orchestration to include integration and LLMC tests during nightly runs.

Directory and Path Corrections

  • Fixed test discovery paths for incremental and LLMC unit tests to ensure correct test files are executed. [1] [2]

These updates make the test pipeline more robust, prevent hanging jobs, and provide better diagnostics for slow or problematic tests.

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
@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).

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.

2 participants