Move some DRC regression tests
The RegressionZoneFillTests handle issues that are resolved by the zone filler, so Clipper2 problematic fill belongs there. Otherwise, the remaining tests should not refill the zones before running DRC because we expect the DRC to catch errors without needing a refill
This commit is contained in:
parent
954b265839
commit
998e749918
|
@ -190,16 +190,94 @@
|
|||
(filled_polygon
|
||||
(layer "F.Cu")
|
||||
(pts
|
||||
(xy 137.4375 55.017113)
|
||||
(xy 137.482887 55.0625)
|
||||
(xy 130.25 66.330633)
|
||||
(xy 130.463483 66.273433)
|
||||
(xy 130.463492 66.273429)
|
||||
(xy 130.677578 66.1736)
|
||||
(xy 130.871082 66.038105)
|
||||
(xy 131.037636 65.871551)
|
||||
(xy 131.098959 65.838066)
|
||||
(xy 131.16865 65.84305)
|
||||
(xy 131.224584 65.884921)
|
||||
(xy 131.249001 65.950386)
|
||||
(xy 131.249317 65.959232)
|
||||
(xy 131.249318 66.89428)
|
||||
(xy 131.229634 66.961319)
|
||||
(xy 131.17683 67.007074)
|
||||
(xy 131.125318 67.01828)
|
||||
(xy 129.123318 67.01828)
|
||||
(xy 129.056279 66.998595)
|
||||
(xy 129.010524 66.945791)
|
||||
(xy 128.999318 66.89428)
|
||||
(xy 128.999318 66.185557)
|
||||
(xy 129.019001 66.118522)
|
||||
(xy 129.071805 66.072767)
|
||||
(xy 129.140964 66.062823)
|
||||
(xy 129.194441 66.083987)
|
||||
(xy 129.322414 66.173595)
|
||||
(xy 129.32242 66.173599)
|
||||
(xy 129.536507 66.273429)
|
||||
(xy 129.536516 66.273433)
|
||||
(xy 129.75 66.330634)
|
||||
(xy 129.75 65.435501)
|
||||
(xy 129.857685 65.48468)
|
||||
(xy 129.964237 65.5)
|
||||
(xy 130.035763 65.5)
|
||||
(xy 130.142315 65.48468)
|
||||
(xy 130.25 65.435501)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "F.Cu")
|
||||
(pts
|
||||
(xy 130.193039 64.269685)
|
||||
(xy 130.238794 64.322489)
|
||||
(xy 130.25 64.374)
|
||||
(xy 130.25 64.564498)
|
||||
(xy 130.142315 64.51532)
|
||||
(xy 130.035763 64.5)
|
||||
(xy 129.964237 64.5)
|
||||
(xy 129.857685 64.51532)
|
||||
(xy 129.75 64.564498)
|
||||
(xy 129.75 64.374)
|
||||
(xy 129.769685 64.306961)
|
||||
(xy 129.822489 64.261206)
|
||||
(xy 129.874 64.25)
|
||||
(xy 130.126 64.25)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "F.Cu")
|
||||
(pts
|
||||
(xy 130.25 63.126)
|
||||
(xy 130.230315 63.193039)
|
||||
(xy 130.177511 63.238794)
|
||||
(xy 130.126 63.25)
|
||||
(xy 129.874 63.25)
|
||||
(xy 129.806961 63.230315)
|
||||
(xy 129.761206 63.177511)
|
||||
(xy 129.75 63.126)
|
||||
(xy 129.749999 62.895501)
|
||||
(xy 129.857685 62.94468)
|
||||
(xy 129.964237 62.96)
|
||||
(xy 130.035763 62.96)
|
||||
(xy 130.142315 62.94468)
|
||||
(xy 130.25 62.895501)
|
||||
)
|
||||
)
|
||||
(filled_polygon
|
||||
(layer "F.Cu")
|
||||
(pts
|
||||
(xy 137.442539 55.020185)
|
||||
(xy 137.488294 55.072989)
|
||||
(xy 137.4995 55.1245)
|
||||
(xy 137.4995 72.3755)
|
||||
(xy 137.482887 72.4375)
|
||||
(xy 137.4375 72.482887)
|
||||
(xy 137.479815 72.442539)
|
||||
(xy 137.427011 72.488294)
|
||||
(xy 137.3755 72.4995)
|
||||
(xy 122.6245 72.4995)
|
||||
(xy 122.5625 72.482887)
|
||||
(xy 122.517113 72.4375)
|
||||
(xy 122.557461 72.479815)
|
||||
(xy 122.511706 72.427011)
|
||||
(xy 122.5005 72.3755)
|
||||
(xy 122.5005 60.26828)
|
||||
(xy 127.499318 60.26828)
|
||||
|
@ -208,92 +286,65 @@
|
|||
(xy 132.499321 68.01828)
|
||||
(xy 132.499318 65.5)
|
||||
(xy 131.425249 65.5)
|
||||
(xy 131.370405 65.487212)
|
||||
(xy 131.326873 65.451486)
|
||||
(xy 131.303632 65.400191)
|
||||
(xy 131.35821 65.480315)
|
||||
(xy 131.312455 65.427511)
|
||||
(xy 131.302511 65.358353)
|
||||
(xy 131.305474 65.343906)
|
||||
(xy 131.330636 65.25)
|
||||
(xy 130.25 65.25)
|
||||
(xy 130.25 66.330635)
|
||||
(xy 130.463492 66.27343)
|
||||
(xy 130.677576 66.1736)
|
||||
(xy 130.871081 66.038106)
|
||||
(xy 131.037637 65.871551)
|
||||
(xy 131.087 65.841301)
|
||||
(xy 131.144716 65.836759)
|
||||
(xy 131.198203 65.858914)
|
||||
(xy 131.235803 65.902937)
|
||||
(xy 131.249318 65.959232)
|
||||
(xy 131.249318 66.89428)
|
||||
(xy 131.232705 66.95628)
|
||||
(xy 131.187318 67.001667)
|
||||
(xy 131.125318 67.01828)
|
||||
(xy 129.123318 67.01828)
|
||||
(xy 129.061318 67.001667)
|
||||
(xy 129.015931 66.95628)
|
||||
(xy 128.999318 66.89428)
|
||||
(xy 128.999318 66.185562)
|
||||
(xy 129.017309 66.121234)
|
||||
(xy 129.066061 66.075573)
|
||||
(xy 129.131428 66.061828)
|
||||
(xy 129.194442 66.083987)
|
||||
(xy 129.322423 66.1736)
|
||||
(xy 129.536507 66.27343)
|
||||
(xy 129.749999 66.330635)
|
||||
(xy 129.75 66.330636)
|
||||
(xy 129.75 64.374)
|
||||
(xy 129.766613 64.312)
|
||||
(xy 129.812 64.266613)
|
||||
(xy 129.874 64.25)
|
||||
(xy 130.126 64.25)
|
||||
(xy 130.188 64.266613)
|
||||
(xy 130.233387 64.312)
|
||||
(xy 130.25 64.374)
|
||||
(xy 130.25 64.75)
|
||||
(xy 130.433686 65.25)
|
||||
(xy 130.459493 65.209844)
|
||||
(xy 130.5 65.071889)
|
||||
(xy 130.5 64.928111)
|
||||
(xy 130.459493 64.790156)
|
||||
(xy 130.433686 64.75)
|
||||
(xy 131.330636 64.75)
|
||||
(xy 131.330635 64.749999)
|
||||
(xy 131.27343 64.536507)
|
||||
(xy 131.173599 64.322421)
|
||||
(xy 131.038109 64.128921)
|
||||
(xy 131.273432 64.536513)
|
||||
(xy 131.273429 64.536507)
|
||||
(xy 131.1736 64.322422)
|
||||
(xy 131.173599 64.32242)
|
||||
(xy 131.038113 64.128926)
|
||||
(xy 131.038108 64.12892)
|
||||
(xy 130.915665 64.006477)
|
||||
(xy 130.884369 63.953731)
|
||||
(xy 130.88218 63.892438)
|
||||
(xy 130.909633 63.837593)
|
||||
(xy 130.88218 63.945154)
|
||||
(xy 130.887164 63.875462)
|
||||
(xy 130.929036 63.819529)
|
||||
(xy 130.960013 63.802614)
|
||||
(xy 131.092088 63.753352)
|
||||
(xy 131.207188 63.667188)
|
||||
(xy 131.293352 63.552089)
|
||||
(xy 131.343597 63.417375)
|
||||
(xy 131.35 63.357824)
|
||||
(xy 131.092086 63.753354)
|
||||
(xy 131.092093 63.75335)
|
||||
(xy 131.207187 63.66719)
|
||||
(xy 131.20719 63.667187)
|
||||
(xy 131.29335 63.552093)
|
||||
(xy 131.293354 63.552086)
|
||||
(xy 131.343596 63.417379)
|
||||
(xy 131.343598 63.417372)
|
||||
(xy 131.349999 63.357844)
|
||||
(xy 131.35 63.357827)
|
||||
(xy 131.35 62.71)
|
||||
(xy 130.25 62.71)
|
||||
(xy 130.25 63.126)
|
||||
(xy 130.233387 63.188)
|
||||
(xy 130.188 63.233387)
|
||||
(xy 130.126 63.25)
|
||||
(xy 129.874 63.25)
|
||||
(xy 129.812 63.233387)
|
||||
(xy 129.766613 63.188)
|
||||
(xy 129.75 63.126)
|
||||
(xy 129.75 62.334)
|
||||
(xy 129.766613 62.272)
|
||||
(xy 129.812 62.226613)
|
||||
(xy 129.874 62.21)
|
||||
(xy 130.433686 62.71)
|
||||
(xy 130.459493 62.669844)
|
||||
(xy 130.5 62.531889)
|
||||
(xy 130.5 62.388111)
|
||||
(xy 130.459493 62.250156)
|
||||
(xy 130.433686 62.21)
|
||||
(xy 131.35 62.21)
|
||||
(xy 131.35 61.562176)
|
||||
(xy 131.343597 61.502624)
|
||||
(xy 131.318604 61.435614)
|
||||
(xy 131.311753 61.376827)
|
||||
(xy 131.33293 61.32156)
|
||||
(xy 131.377311 61.282404)
|
||||
(xy 131.434786 61.26828)
|
||||
(xy 131.349999 62.209999)
|
||||
(xy 131.35 61.562172)
|
||||
(xy 131.349999 61.562155)
|
||||
(xy 131.343598 61.502627)
|
||||
(xy 131.343596 61.502619)
|
||||
(xy 131.318605 61.435613)
|
||||
(xy 131.313621 61.365921)
|
||||
(xy 131.347106 61.304598)
|
||||
(xy 131.40843 61.271114)
|
||||
(xy 131.434787 61.26828)
|
||||
(xy 132.499318 61.26828)
|
||||
(xy 132.499318 60.26828)
|
||||
(xy 127.499318 60.26828)
|
||||
(xy 122.5005 60.26828)
|
||||
(xy 122.5005 55.1245)
|
||||
(xy 122.517113 55.0625)
|
||||
(xy 122.5625 55.017113)
|
||||
(xy 122.520185 55.057461)
|
||||
(xy 122.572989 55.011706)
|
||||
(xy 122.6245 55.0005)
|
||||
(xy 137.3755 55.0005)
|
||||
)
|
||||
|
|
|
@ -61,14 +61,13 @@ BOOST_FIXTURE_TEST_CASE( DRCFalsePositiveRegressions, DRC_REGRESSION_TEST_FIXTUR
|
|||
"issue10906", // Soldermask bridge for only one object
|
||||
"issue11814", // Bad cache hit in isInsideArea
|
||||
"issue12609", // Arc collison edge case
|
||||
"issue14294", // Bad Clipper2 fill
|
||||
"issue14412" // Solder mask bridge between pads in a net-tie pad group
|
||||
};
|
||||
|
||||
for( const wxString& relPath : tests )
|
||||
{
|
||||
KI_TEST::LoadBoard( m_settingsManager, relPath, m_board );
|
||||
KI_TEST::FillZones( m_board.get() );
|
||||
// Do not refill zones here because this is testing the DRC engine, not the zone filler
|
||||
|
||||
std::vector<DRC_ITEM> violations;
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
|
@ -118,7 +117,7 @@ BOOST_FIXTURE_TEST_CASE( DRCFalsePositiveRegressions, DRC_REGRESSION_TEST_FIXTUR
|
|||
|
||||
BOOST_FIXTURE_TEST_CASE( DRCFalseNegativeRegressions, DRC_REGRESSION_TEST_FIXTURE )
|
||||
{
|
||||
// These documents at one time failed to catch DRC errors that they should have.
|
||||
// These documents at one time failed to catch DRC errors that they should have
|
||||
|
||||
std::vector< std::pair<wxString, int> > tests =
|
||||
{
|
||||
|
@ -131,78 +130,19 @@ BOOST_FIXTURE_TEST_CASE( DRCFalseNegativeRegressions, DRC_REGRESSION_TEST_FIXTUR
|
|||
{ "issue6945", 2 },
|
||||
{ "issue7241", 1 },
|
||||
{ "issue7267", 4 },
|
||||
{ "issue7325", 2 },
|
||||
{ "issue7325", 4 },
|
||||
{ "issue8003", 2 },
|
||||
{ "issue9081", 2 },
|
||||
{ "issue12109", 8 }, // Pads fail annular width test
|
||||
{ "issue14334", 2 }, // Thermal spoke to otherwise unconnected island
|
||||
{ "reverse_via", 3 } // Via/track ordering
|
||||
};
|
||||
|
||||
for( const std::pair<wxString, int>& entry : tests )
|
||||
{
|
||||
KI_TEST::LoadBoard( m_settingsManager, entry.first, m_board );
|
||||
KI_TEST::FillZones( m_board.get() );
|
||||
|
||||
std::vector<DRC_ITEM> violations;
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
|
||||
// Disable DRC tests not useful in this testcase
|
||||
bds.m_DRCSeverities[ DRCE_COPPER_SLIVER ] = SEVERITY::RPT_SEVERITY_IGNORE;
|
||||
bds.m_DRCSeverities[ DRCE_LIB_FOOTPRINT_ISSUES ] = SEVERITY::RPT_SEVERITY_IGNORE;
|
||||
bds.m_DRCSeverities[ DRCE_LIB_FOOTPRINT_MISMATCH ] = SEVERITY::RPT_SEVERITY_IGNORE;
|
||||
|
||||
bds.m_DRCEngine->SetViolationHandler(
|
||||
[&]( const std::shared_ptr<DRC_ITEM>& aItem, VECTOR2I aPos, int aLayer )
|
||||
{
|
||||
PCB_MARKER temp( aItem, aPos );
|
||||
|
||||
if( bds.m_DrcExclusions.find( temp.Serialize() ) == bds.m_DrcExclusions.end() )
|
||||
violations.push_back( *aItem );
|
||||
} );
|
||||
|
||||
bds.m_DRCEngine->RunTests( EDA_UNITS::MILLIMETRES, true, false );
|
||||
|
||||
if( violations.size() == entry.second )
|
||||
{
|
||||
BOOST_CHECK_EQUAL( 1, 1 ); // quiet "did not check any assertions" warning
|
||||
BOOST_TEST_MESSAGE( wxString::Format( "DRC regression: %s, passed", entry.first ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_CHECK_EQUAL( violations.size(), entry.second );
|
||||
|
||||
UNITS_PROVIDER unitsProvider( pcbIUScale, EDA_UNITS::INCHES );
|
||||
|
||||
std::map<KIID, EDA_ITEM*> itemMap;
|
||||
m_board->FillItemMap( itemMap );
|
||||
|
||||
for( const DRC_ITEM& item : violations )
|
||||
{
|
||||
BOOST_TEST_MESSAGE( item.ShowReport( &unitsProvider, RPT_SEVERITY_ERROR,
|
||||
itemMap ) );
|
||||
}
|
||||
|
||||
BOOST_ERROR( wxString::Format( "DRC regression: %s, failed", entry.first ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE( DRCFalseNegativeRegressionsNoFill, DRC_REGRESSION_TEST_FIXTURE )
|
||||
{
|
||||
// These documents at one time failed to catch DRC errors that they should have but only
|
||||
// when the zones were filled. In other words, refilling the zone will fix the error, but
|
||||
// DRC should have caught it regardless
|
||||
|
||||
std::vector< std::pair<wxString, int> > tests =
|
||||
{
|
||||
{ "issue12109", 8 }, // Pads fail annular width test
|
||||
{ "issue14334", 2 }, // Thermal spoke to otherwise unconnected island
|
||||
{ "reverse_via", 3 }, // Via/track ordering
|
||||
{ "intersectingzones", 1 } // zones are too close to each other
|
||||
};
|
||||
|
||||
for( const std::pair<wxString, int>& entry : tests )
|
||||
{
|
||||
KI_TEST::LoadBoard( m_settingsManager, entry.first, m_board );
|
||||
// Do not refill zones here because this is testing the DRC engine, not the zone filler
|
||||
|
||||
std::vector<DRC_ITEM> violations;
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
|
|
|
@ -189,7 +189,9 @@ BOOST_FIXTURE_TEST_CASE( RegressionZoneFillTests, ZONE_FILL_TEST_FIXTURE )
|
|||
"issue6039",
|
||||
"issue6260",
|
||||
"issue6284",
|
||||
"issue7086" };
|
||||
"issue7086",
|
||||
"issue14294" // Bad Clipper2 fill
|
||||
};
|
||||
|
||||
for( const wxString& relPath : tests )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue