Fix test_drc_regressions.cpp: disable tests that need a footprint library

DRCE_LIB_FOOTPRINT_ISSUES and DRCE_LIB_FOOTPRINT_MISMATCH imply a library
but the test cases do not have a library.
This commit is contained in:
jean-pierre charras 2022-01-12 15:57:41 +01:00
parent ea3efac2b6
commit cf11abda3d
3 changed files with 5 additions and 3 deletions

View File

@ -223,7 +223,7 @@ int OUTLINE_DECOMPOSER::winding( const GLYPH_POINTS& aContour ) const
return 0;
}
unsigned int i_lowest_vertex;
unsigned int i_lowest_vertex = 0;
double lowest_y = std::numeric_limits<double>::max();
for( unsigned int i = 0; i < aContour.size(); i++ )

View File

@ -499,7 +499,7 @@ bool DRC_TEST_PROVIDER_LIBRARY_PARITY::Run()
drcItem->SetItems( footprint );
reportViolation( drcItem, footprint->GetCenter(), UNDEFINED_LAYER );
}
else if( libFootprint && footprint->FootprintNeedsUpdate( libFootprint.get() )
else if( footprint->FootprintNeedsUpdate( libFootprint.get() )
&& !m_drcEngine->IsErrorLimitExceeded( DRCE_LIB_FOOTPRINT_MISMATCH ))
{
std::shared_ptr<DRC_ITEM> drcItem = DRC_ITEM::Create( DRCE_LIB_FOOTPRINT_MISMATCH );

View File

@ -68,11 +68,13 @@ BOOST_FIXTURE_TEST_CASE( DRCFalsePositiveRegressions, DRC_REGRESSION_TEST_FIXTUR
std::vector<DRC_ITEM> violations;
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
// Disable DRC tests not useful in this testcase
// Disable DRC tests not useful or not handled in this testcase
bds.m_DRCSeverities[ DRCE_INVALID_OUTLINE ] = SEVERITY::RPT_SEVERITY_IGNORE;
bds.m_DRCSeverities[ DRCE_UNCONNECTED_ITEMS ] = SEVERITY::RPT_SEVERITY_IGNORE;
bds.m_DRCSeverities[ DRCE_COPPER_SLIVER ] = SEVERITY::RPT_SEVERITY_IGNORE;
bds.m_DRCSeverities[ DRCE_STARVED_THERMAL ] = 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, PCB_LAYER_ID aLayer )