37#ifndef QA_EESCHEMA_DATA_LOCATION
38 #define QA_EESCHEMA_DATA_LOCATION "???"
43 const char* env = std::getenv(
"KICAD_TEST_EESCHEMA_DATA_DIR" );
61 return wxFileName{ fn };
69 BOOST_TEST_MESSAGE( fn.GetFullPath() );
90 screen->UpdateLocalLibSymbolLinks();
103 sheet.UpdateAllScreenReferences();
115 fn.AppendDir(
"netlists" );
116 fn.AppendDir( aBaseName );
117 fn.SetName( aBaseName );
124template <
typename Exporter>
127 wxFileName netFile = m_schematic.Prj().GetProjectFullName();
130 netFile.SetName( netFile.GetName() +
"_test" );
134 return netFile.GetFullPath();
138template <
typename Exporter>
142 if( wxFileExists( GetNetlistPath(
true ) ) )
143 wxRemoveFile( GetNetlistPath(
true ) );
145 auto exporter = std::make_unique<Exporter>( &m_schematic );
146 BOOST_REQUIRE_EQUAL( exporter->WriteNetlist( GetNetlistPath(
true ), GetNetlistOptions() ),
151template <
typename Exporter>
154 wxRemoveFile( GetNetlistPath(
true ) );
159template <
typename Exporter>
162 LoadSchematic( aBaseName );
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr)
Updates the connection graph for the given list of sheets.
SETTINGS_MANAGER m_manager
virtual void LoadSchematic(const wxString &aRelativePath)
SCHEMATIC m_schematic
Schematic to load
virtual wxFileName GetSchematicPath(const wxString &aBaseName)
virtual void SetElem(ELEM_T aIndex, _ELEM *aElem)
void Reset()
Initialize this schematic to a blank one, unloading anything existing.
SCH_SHEET_PATH & CurrentSheet() const override
CONNECTION_GRAPH * ConnectionGraph() const override
SCH_SHEET_LIST GetSheets() const override
Builds and returns an updated schematic hierarchy TODO: can this be cached?
void SetRoot(SCH_SHEET *aRootSheet)
Initialize the schematic with a new root sheet.
void SetProject(PROJECT *aPrj)
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
virtual SCH_SHEET * Load(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const PROPERTIES *aProperties=nullptr)
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
virtual const wxString & GetError() const
Return an error string to the caller.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
const std::vector< SYMBOL_INSTANCE_REFERENCE > & GetSymbolInstances() const
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void UpdateSheetInstances(const std::vector< SCH_SHEET_INSTANCE > &aSheetInstances)
Update all of the sheet instance information using aSheetInstances.
void UpdateSymbolInstances(const std::vector< SYMBOL_INSTANCE_REFERENCE > &aSymbolInstances)
Update all of the symbol instance information using aSymbolInstances.
void AnnotatePowerSymbols()
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void push_back(SCH_SHEET *aSheet)
Forwarded method from std::vector.
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
void TestNetlist(const wxString &aBaseName)
virtual wxString GetNetlistPath(bool aTest=false)
#define QA_EESCHEMA_DATA_LOCATION
const std::string ProjectFileExtension
const std::string NetlistFileExtension
const std::string KiCadSchematicFileExtension
wxFileName GetEeschemaTestDataDir()
Get the configured location of Eeschema test data.
Definition of file extensions used in Kicad.