From 38bfc835486f1a6db99fe241bf47296736b976fc Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 6 Jan 2026 15:44:35 -0800 Subject: [PATCH] Disable creepage QA fail on GitLab Move the gitlab creepage timing to a metric. Keep the QA check locally though --- .gitlab/templates.yml | 5 ++- .../drc/test_drc_creepage_issue21482.cpp | 32 ++++++++++++++++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/.gitlab/templates.yml b/.gitlab/templates.yml index ef05107899..43723117b0 100644 --- a/.gitlab/templates.yml +++ b/.gitlab/templates.yml @@ -33,6 +33,9 @@ - build/linux/qa/**/*.log - build/linux/qa/**/output/* - build/linux/qa/**/*.xml + - build/linux/qa/*_metrics.txt reports: junit: - - build/linux/qa/**/*.xml \ No newline at end of file + - build/linux/qa/**/*.xml + metrics: + - build/linux/qa/*_metrics.txt \ No newline at end of file diff --git a/qa/tests/pcbnew/drc/test_drc_creepage_issue21482.cpp b/qa/tests/pcbnew/drc/test_drc_creepage_issue21482.cpp index d0011b6185..bd35645323 100644 --- a/qa/tests/pcbnew/drc/test_drc_creepage_issue21482.cpp +++ b/qa/tests/pcbnew/drc/test_drc_creepage_issue21482.cpp @@ -46,6 +46,8 @@ #include #include +#include +#include struct DRC_CREEPAGE_PERF_TEST_FIXTURE @@ -140,11 +142,31 @@ BOOST_FIXTURE_TEST_CASE( CreepagePerformanceIssue21482, DRC_CREEPAGE_PERF_TEST_F // Clear the violation handler bds.m_DRCEngine->ClearViolationHandler(); - // Performance check: should complete in less than 20 seconds - // The original was more than 2 minutes. - BOOST_CHECK_MESSAGE( elapsedSeconds < 20.0, - wxString::Format( "Creepage DRC too slow: %.2f seconds (target: <20s)", - elapsedSeconds ) ); + // Check if running on GitLab CI + bool onGitLabCI = std::getenv( "GITLAB_CI" ) != nullptr; + + if( onGitLabCI ) + { + // On GitLab CI, write metrics to a file for collection as an artifact. + // The timeout varies too much between runners, so we only record the time + // without asserting on it. + std::ofstream metricsFile( "creepage_perf_metrics.txt" ); + + if( metricsFile.is_open() ) + { + metricsFile << "creepage_drc_seconds " << elapsedSeconds << "\n"; + metricsFile << "creepage_violations " << violations.size() << "\n"; + metricsFile.close(); + BOOST_TEST_MESSAGE( "Metrics written to creepage_perf_metrics.txt" ); + } + } + else + { + // On local machines, enforce the timeout constraint + BOOST_CHECK_MESSAGE( elapsedSeconds < 20.0, + wxString::Format( "Creepage DRC too slow: %.2f seconds (target: <20s)", + elapsedSeconds ) ); + } // Performance tier feedback if( elapsedSeconds < 5.0 )