qa/pns: work in progress on pns_log_viewer.

This commit is contained in:
Tomasz Wlostowski 2021-05-28 00:52:27 +02:00
parent ea4161c42f
commit d31d2e28ca
4 changed files with 364 additions and 984 deletions

View File

@ -92,12 +92,11 @@ target_link_libraries( test_pns
tinyspline_lib tinyspline_lib
nanosvg nanosvg
idf3 idf3
unit_test_utils
${PCBNEW_IO_LIBRARIES} ${PCBNEW_IO_LIBRARIES}
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}
${PYTHON_LIBRARIES} ${PYTHON_LIBRARIES}
${Boost_LIBRARIES} # must follow GITHUB ${Boost_LIBRARIES}
${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost ${PCBNEW_EXTRA_LIBS} # -lrt must follow Boost
) )

View File

@ -129,8 +129,10 @@ void PNS_TEST_ENVIRONMENT::createRouter()
m_router->SetMode( m_mode ); m_router->SetMode( m_mode );
m_router->SyncWorld(); m_router->SyncWorld();
m_router->LoadSettings( new PNS::ROUTING_SETTINGS (nullptr, "")); m_router->LoadSettings( new PNS::ROUTING_SETTINGS (nullptr, ""));
m_router->Settings().SetMode( PNS::RM_Shove ); m_router->Settings().SetMode( PNS::RM_Walkaround );
m_router->Settings().SetOptimizeDraggedTrack( true ); m_router->Sizes().SetTrackWidth( 250000 );
//m_router->Settings().SetOptimizeDraggedTrack( true );
m_debugDecorator.Clear(); m_debugDecorator.Clear();
m_iface->SetDebugDecorator( &m_debugDecorator ); m_iface->SetDebugDecorator( &m_debugDecorator );
@ -305,6 +307,7 @@ void PNS_TEST_DEBUG_DECORATOR::AddPoint( VECTOR2I aP, int aColor, int aSize, con
ent->m_width = 30000; ent->m_width = 30000;
ent->m_iter = m_iter; ent->m_iter = m_iter;
ent->m_name = aName; ent->m_name = aName;
ent->m_hasLabels = false;
addEntry( ent ); addEntry( ent );
} }
@ -379,7 +382,6 @@ void PNS_TEST_DEBUG_DECORATOR::NewStage(const std::string& name, int iter)
void PNS_TEST_DEBUG_DECORATOR::DEBUG_ENT::IterateTree( std::function<bool(PNS_TEST_DEBUG_DECORATOR::DEBUG_ENT*)> visitor, int depth ) void PNS_TEST_DEBUG_DECORATOR::DEBUG_ENT::IterateTree( std::function<bool(PNS_TEST_DEBUG_DECORATOR::DEBUG_ENT*)> visitor, int depth )
{ {
printf("LOG D:%d iter: %p\n", depth, this );
if( ! visitor( this ) ) if( ! visitor( this ) )
return; return;

View File

@ -173,6 +173,7 @@ public:
std::vector<DEBUG_ENT*> m_children; std::vector<DEBUG_ENT*> m_children;
int m_color; int m_color;
int m_width; int m_width;
bool m_hasLabels = true;
int m_iter; int m_iter;
std::string m_name; std::string m_name;
std::string m_msg; std::string m_msg;

File diff suppressed because it is too large Load Diff