20#include <boost/test/unit_test.hpp>
36#include <wx/filename.h>
46 namespace fs = std::filesystem;
53 job.
m_filename = wxString::FromUTF8( schematic.string().c_str() );
57 + wxFileName::GetPathSeparator() );
64 BOOST_CHECK( fs::is_regular_file( outputDir.
Path() /
"issue24217.pdf" ) );
83 namespace fs = std::filesystem;
88 wxString schPath = wxString::FromUTF8( schematic.string().c_str() );
89 wxString folder = wxString::FromUTF8( outputDir.
Path().string().c_str() ) + wxFileName::GetPathSeparator();
109 std::vector<std::tuple<JOB*, HANDLER_FN, std::string>> cases = {
116 for(
auto& [job, run,
expected] : cases )
120 job->SetConfiguredOutputPath( folder );
123 BOOST_CHECK_MESSAGE( fs::is_regular_file( outputDir.
Path() /
expected ),
reporter.GetMessages() );
Handle Eeschema job dispatches.
int JobExportNetlist(JOB *aJob)
int JobExportBom(JOB *aJob)
int JobExportPythonBom(JOB *aJob)
int JobExportPlot(JOB *aJob)
void SetReporter(REPORTER *aReporter)
bool m_exitCodeViolations
An simple container class that lets us dispatch output jobs to kifaces.
void SetConfiguredOutputPath(const wxString &aPath)
Sets the configured output path for the job, this path is always saved to file.
FACE_T
Known KIFACE implementations.
KIWAY(int aCtlBits, wxFrame *aTop=nullptr)
const std::filesystem::path & Path() const
Get the path to the temporary directory as a std::filesystem::path.
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true) override
Return the KIFACE* given a FACE_T.
A wrapper for reporting to a wxString object.
#define KFCTL_STANDALONE
Running as a standalone Top.
std::string GetTestDataRootDir()
std::vector< FAB_LAYER_COLOR > dummy
Implement a participant in the KIWAY alchemy.
BOOST_CHECK(res.column_datatype(0)==SQL_NUMERIC||res.column_datatype(0)==SQL_DECIMAL)
BOOST_CHECK_EQUAL(std::any_cast< std::string >(rows[0].at("val")), "12345678901234567.89")
BOOST_AUTO_TEST_CASE(SchPlotJobOutputFolderGetsDefaultName)
IbisParser parser & reporter
VECTOR3I expected(15, 30, 45)
BOOST_TEST_CONTEXT("Test Clearance")