QA test code: fix some issues:
- in python tests force the "C" locale is in use (remove wx alerts in some locales) - disable some new DRC tests that are irrelevant in QA tests and create false positives
This commit is contained in:
parent
7fa451dc93
commit
bf5cdec743
|
@ -65,8 +65,11 @@ 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
|
||||
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_DRCEngine->SetViolationHandler(
|
||||
[&]( const std::shared_ptr<DRC_ITEM>& aItem, VECTOR2I aPos, PCB_LAYER_ID aLayer )
|
||||
|
@ -124,6 +127,11 @@ BOOST_FIXTURE_TEST_CASE( DRCFalseNegativeRegressions, DRC_REGRESSION_TEST_FIXTUR
|
|||
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_STARVED_THERMAL ] = SEVERITY::RPT_SEVERITY_IGNORE;
|
||||
bds.m_DRCSeverities[ DRCE_LIB_FOOTPRINT_ISSUES ] = SEVERITY::RPT_SEVERITY_IGNORE;
|
||||
|
||||
bds.m_DRCEngine->SetViolationHandler(
|
||||
[&]( const std::shared_ptr<DRC_ITEM>& aItem, VECTOR2I aPos, PCB_LAYER_ID aLayer )
|
||||
{
|
||||
|
|
|
@ -135,7 +135,8 @@ BOOST_FIXTURE_TEST_CASE( TrackCleanerRegressionTests, TRACK_CLEANER_TEST_FIXTURE
|
|||
*/
|
||||
std::vector<wxString> tests = { "issue832",
|
||||
"issue4257",
|
||||
"issue8909" };
|
||||
"issue8909"
|
||||
};
|
||||
|
||||
for( const wxString& relPath : tests )
|
||||
{
|
||||
|
@ -170,6 +171,11 @@ BOOST_FIXTURE_TEST_CASE( TrackCleanerRegressionTests, TRACK_CLEANER_TEST_FIXTURE
|
|||
std::vector<DRC_ITEM> violations;
|
||||
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
|
||||
|
||||
// Disable some DRC tests not useful in this testcase
|
||||
bds.m_DRCSeverities[ DRCE_LIB_FOOTPRINT_ISSUES ] = 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_DRCEngine->SetViolationHandler(
|
||||
[&]( const std::shared_ptr<DRC_ITEM>& aItem, VECTOR2I aPos, PCB_LAYER_ID aLayer )
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@ import unittest
|
|||
import platform
|
||||
import sys
|
||||
import argparse
|
||||
import locale
|
||||
|
||||
if platform.python_version() < '2.7':
|
||||
unittest = __import__('unittest2')
|
||||
|
@ -29,6 +30,10 @@ if __name__ == '__main__':
|
|||
print("Install the xmlrunner package.")
|
||||
sys.exit(2)
|
||||
|
||||
# Useful in some non English installs (using a comma as load number separator) to avoid
|
||||
# wxWidgets alerts when running the test code
|
||||
locale.setlocale(locale.LC_ALL, 'C')
|
||||
|
||||
testsuite = unittest.TestLoader().discover('testcases', pattern="*.py")
|
||||
|
||||
if args.xml:
|
||||
|
|
Loading…
Reference in New Issue