KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KI_TEST::TEMPORARY_DIRECTORY Class Reference

A temporary directory that will be deleted when it goes out of scope. More...

#include <board_test_utils.h>

Public Member Functions

 TEMPORARY_DIRECTORY (const std::string &aNamePrefix, const std::string aSuffix)
 Create a temporary directory with a given prefix and suffix.
 
 ~TEMPORARY_DIRECTORY ()
 
const std::filesystem::path & GetPath () const
 

Private Attributes

std::filesystem::path m_path
 

Detailed Description

A temporary directory that will be deleted when it goes out of scope.

Footprint round-trip tests must save into a directory of their own. Saving a footprint causes the whole containing directory to be validated as a library, so writing directly into the shared system temp directory makes the test fail whenever any unrelated .kicad_mod file happens to live there.

Definition at line 84 of file board_test_utils.h.

Constructor & Destructor Documentation

◆ TEMPORARY_DIRECTORY()

KI_TEST::TEMPORARY_DIRECTORY::TEMPORARY_DIRECTORY ( const std::string & aNamePrefix,
const std::string aSuffix )
inline

Create a temporary directory with a given prefix and suffix.

The directory will be created in the system temporary directory, and will not be pre-existing.

Definition at line 91 of file board_test_utils.h.

References m_path.

◆ ~TEMPORARY_DIRECTORY()

KI_TEST::TEMPORARY_DIRECTORY::~TEMPORARY_DIRECTORY ( )
inline

Definition at line 111 of file board_test_utils.h.

References m_path.

Member Function Documentation

◆ GetPath()

const std::filesystem::path & KI_TEST::TEMPORARY_DIRECTORY::GetPath ( ) const
inline

Member Data Documentation

◆ m_path

std::filesystem::path KI_TEST::TEMPORARY_DIRECTORY::m_path
private

Definition at line 116 of file board_test_utils.h.

Referenced by GetPath(), TEMPORARY_DIRECTORY(), and ~TEMPORARY_DIRECTORY().


The documentation for this class was generated from the following file: