KiCad PCB EDA Suite
Loading...
Searching...
No Matches
API_SERVER_E2E_FIXTURE Class Reference

#include <api_e2e_utils.h>

Public Member Functions

 API_SERVER_E2E_FIXTURE ()
 
 ~API_SERVER_E2E_FIXTURE ()
 
bool Start (const wxString &aCliPathOverride=wxString())
 
API_TEST_CLIENTClient ()
 
wxString CliPath () const
 
const wxString & LastError () const
 

Private Member Functions

bool startServerProcess (const wxString &aCliPathOverride)
 
void collectServerOutput ()
 
void stopServer ()
 
bool isProcessAlive () const
 

Private Attributes

API_TEST_CLIENT m_client
 
API_SERVER_PROCESSm_process = nullptr
 
long m_pid = 0
 
wxString m_cliPath
 
wxString m_socketPath
 
wxString m_stdout
 
wxString m_stderr
 
wxString m_lastError
 
int m_exitCode = 0
 

Detailed Description

Definition at line 444 of file api_e2e_utils.h.

Constructor & Destructor Documentation

◆ API_SERVER_E2E_FIXTURE()

API_SERVER_E2E_FIXTURE::API_SERVER_E2E_FIXTURE ( )
inline

Definition at line 447 of file api_e2e_utils.h.

References m_cliPath, m_socketPath, and QA_KICAD_CLI_PATH.

◆ ~API_SERVER_E2E_FIXTURE()

API_SERVER_E2E_FIXTURE::~API_SERVER_E2E_FIXTURE ( )
inline

Definition at line 466 of file api_e2e_utils.h.

References m_socketPath, and stopServer().

Member Function Documentation

◆ Client()

API_TEST_CLIENT & API_SERVER_E2E_FIXTURE::Client ( )
inline

Definition at line 527 of file api_e2e_utils.h.

References m_client.

◆ CliPath()

wxString API_SERVER_E2E_FIXTURE::CliPath ( ) const
inline

Definition at line 529 of file api_e2e_utils.h.

References m_cliPath.

◆ collectServerOutput()

void API_SERVER_E2E_FIXTURE::collectServerOutput ( )
inlineprivate

Definition at line 579 of file api_e2e_utils.h.

References API_SERVER_PROCESS::drainStream(), m_process, m_stderr, and m_stdout.

Referenced by Start(), and stopServer().

◆ isProcessAlive()

bool API_SERVER_E2E_FIXTURE::isProcessAlive ( ) const
inlineprivate

Definition at line 610 of file api_e2e_utils.h.

References m_pid.

Referenced by Start(), and stopServer().

◆ LastError()

const wxString & API_SERVER_E2E_FIXTURE::LastError ( ) const
inline

Definition at line 531 of file api_e2e_utils.h.

References m_lastError.

◆ Start()

bool API_SERVER_E2E_FIXTURE::Start ( const wxString & aCliPathOverride = wxString())
inline

◆ startServerProcess()

bool API_SERVER_E2E_FIXTURE::startServerProcess ( const wxString & aCliPathOverride)
inlineprivate

Definition at line 534 of file api_e2e_utils.h.

References m_cliPath, m_exitCode, m_lastError, m_pid, m_process, m_socketPath, m_stderr, and m_stdout.

Referenced by Start().

◆ stopServer()

void API_SERVER_E2E_FIXTURE::stopServer ( )
inlineprivate

Definition at line 588 of file api_e2e_utils.h.

References collectServerOutput(), isProcessAlive(), m_pid, and m_process.

Referenced by ~API_SERVER_E2E_FIXTURE().

Member Data Documentation

◆ m_client

API_TEST_CLIENT API_SERVER_E2E_FIXTURE::m_client
private

Definition at line 619 of file api_e2e_utils.h.

Referenced by Client(), and Start().

◆ m_cliPath

wxString API_SERVER_E2E_FIXTURE::m_cliPath
private

Definition at line 622 of file api_e2e_utils.h.

Referenced by API_SERVER_E2E_FIXTURE(), CliPath(), and startServerProcess().

◆ m_exitCode

int API_SERVER_E2E_FIXTURE::m_exitCode = 0
mutableprivate

Definition at line 627 of file api_e2e_utils.h.

Referenced by startServerProcess().

◆ m_lastError

wxString API_SERVER_E2E_FIXTURE::m_lastError
private

Definition at line 626 of file api_e2e_utils.h.

Referenced by LastError(), Start(), and startServerProcess().

◆ m_pid

long API_SERVER_E2E_FIXTURE::m_pid = 0
private

Definition at line 621 of file api_e2e_utils.h.

Referenced by isProcessAlive(), startServerProcess(), and stopServer().

◆ m_process

API_SERVER_PROCESS* API_SERVER_E2E_FIXTURE::m_process = nullptr
private

Definition at line 620 of file api_e2e_utils.h.

Referenced by collectServerOutput(), startServerProcess(), and stopServer().

◆ m_socketPath

wxString API_SERVER_E2E_FIXTURE::m_socketPath
private

◆ m_stderr

wxString API_SERVER_E2E_FIXTURE::m_stderr
private

Definition at line 625 of file api_e2e_utils.h.

Referenced by collectServerOutput(), and startServerProcess().

◆ m_stdout

wxString API_SERVER_E2E_FIXTURE::m_stdout
private

Definition at line 624 of file api_e2e_utils.h.

Referenced by collectServerOutput(), and startServerProcess().


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