From 4cd48cd5c90a0c1dc8a0e9e455b2efaadbc39882 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 23 Apr 2022 21:39:00 +0100 Subject: [PATCH] Fix some test issues. --- pcbnew/footprint.cpp | 3 +++ qa/data/pcbnew/issue6879.kicad_pro | 1 + qa/data/pcbnew/issue6945.kicad_pro | 1 + qa/unittests/pcbnew/drc/test_custom_rule_severities.cpp | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 198385f22a..8bb0878ee3 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -2293,6 +2293,9 @@ void FOOTPRINT::CheckOverlappingPads( const std::functionSameLogicalPadAs( other ) ) continue; + if( !( pad->GetLayerSet() & other->GetLayerSet() ).any() ) + continue; + // store canonical order so we don't collide in both directions (a:b and b:a) PAD* a = pad; PAD* b = other; diff --git a/qa/data/pcbnew/issue6879.kicad_pro b/qa/data/pcbnew/issue6879.kicad_pro index 8e19f3b9ee..76ac03ecbd 100755 --- a/qa/data/pcbnew/issue6879.kicad_pro +++ b/qa/data/pcbnew/issue6879.kicad_pro @@ -69,6 +69,7 @@ "drill_out_of_range": "error", "duplicate_footprints": "warning", "extra_footprint": "warning", + "footprint_type_mismatch": "ignore", "hole_clearance": "error", "hole_near_hole": "error", "invalid_outline": "error", diff --git a/qa/data/pcbnew/issue6945.kicad_pro b/qa/data/pcbnew/issue6945.kicad_pro index df42218c6f..66bd21e1a9 100644 --- a/qa/data/pcbnew/issue6945.kicad_pro +++ b/qa/data/pcbnew/issue6945.kicad_pro @@ -69,6 +69,7 @@ "drill_out_of_range": "error", "duplicate_footprints": "warning", "extra_footprint": "warning", + "footprint_type_mismatch": "ignore", "hole_clearance": "error", "hole_near_hole": "error", "invalid_outline": "error", diff --git a/qa/unittests/pcbnew/drc/test_custom_rule_severities.cpp b/qa/unittests/pcbnew/drc/test_custom_rule_severities.cpp index da83e8095d..ca5c96f25e 100644 --- a/qa/unittests/pcbnew/drc/test_custom_rule_severities.cpp +++ b/qa/unittests/pcbnew/drc/test_custom_rule_severities.cpp @@ -59,6 +59,10 @@ BOOST_FIXTURE_TEST_CASE( DRCCustomRuleSeverityTest, DRC_REGRESSION_TEST_FIXTURE bds.m_DRCSeverities[ DRCE_LIB_FOOTPRINT_ISSUES ] = SEVERITY::RPT_SEVERITY_IGNORE; bds.m_DRCSeverities[ DRCE_LIB_FOOTPRINT_MISMATCH ] = SEVERITY::RPT_SEVERITY_IGNORE; + // Also disable a couple of footprint checks which throw up errors on this board + bds.m_DRCSeverities[ DRCE_OVERLAPPING_PADS ] = SEVERITY::RPT_SEVERITY_IGNORE; + bds.m_DRCSeverities[ DRCE_FOOTPRINT_TYPE_MISMATCH ] = SEVERITY::RPT_SEVERITY_IGNORE; + bds.m_DRCEngine->SetViolationHandler( [&]( const std::shared_ptr& aItem, VECTOR2I aPos, PCB_LAYER_ID aLayer ) {