executor.h File Reference

#include <time.h>
#include <unistd.h>

Go to the source code of this file.

Data Structures

struct  _stream_data
struct  _exec_data

Defines

#define SHELLCMD   "/bin/sh"
#define SHELLCMD_ARGS   "-c"
#define SHELLCMD_ARGS_STR   "-c"
#define FAILURE_INFO_TIMEOUT   "timeout"
#define POLL_TIMEOUT_MS   100
#define POLL_TIMEOUT_US   (1000*POLL_TIMEOUT_MS)
#define COMMON_SOFT_TIMEOUT   90
#define COMMON_HARD_TIMEOUT   5

Typedefs

typedef struct _stream_data stream_data
typedef struct _exec_data exec_data

Enumerations

enum  _stream_output_redirection { DONT_REDIRECT_OUTPUT = 0, REDIRECT_OUTPUT }

Functions

void executor_init (testrunner_lite_options *opts)
int execute (const char *command, exec_data *data)
void init_exec_data (exec_data *data)
void clean_exec_data (exec_data *data)
void init_stream_data (stream_data *data, int allocate)
void clean_stream_data (stream_data *data)
void kill_pgroup (int pgroup, int sig)
void executor_close ()
void handle_sigint (int signum)
void handle_sigterm (int signum)

Define Documentation

#define COMMON_HARD_TIMEOUT   5

Definition at line 52 of file executor.h.

#define COMMON_SOFT_TIMEOUT   90

Definition at line 51 of file executor.h.

#define FAILURE_INFO_TIMEOUT   "timeout"

Definition at line 48 of file executor.h.

#define POLL_TIMEOUT_MS   100

Definition at line 49 of file executor.h.

#define POLL_TIMEOUT_US   (1000*POLL_TIMEOUT_MS)

Definition at line 50 of file executor.h.

#define SHELLCMD   "/bin/sh"

Definition at line 41 of file executor.h.

#define SHELLCMD_ARGS   "-c"

Definition at line 46 of file executor.h.

#define SHELLCMD_ARGS_STR   "-c"

Definition at line 47 of file executor.h.


Typedef Documentation

typedef struct _exec_data exec_data

Definition at line 86 of file executor.h.

typedef struct _stream_data stream_data

Definition at line 63 of file executor.h.


Enumeration Type Documentation

Enumerator:
DONT_REDIRECT_OUTPUT 
REDIRECT_OUTPUT 

Definition at line 65 of file executor.h.


Function Documentation

void clean_exec_data ( exec_data data  ) 

Definition at line 837 of file executor.c.

void clean_stream_data ( stream_data data  ) 

Clean stream_data structure

Parameters:
data Pointer to data

Definition at line 862 of file executor.c.

int execute ( const char *  command,
exec_data data 
)

Execute a test step command

Parameters:
command Command to execute
data Input and output data controlling execution
Returns:
0 in success

Definition at line 776 of file executor.c.

void executor_close (  ) 

Clean up for executor

Definition at line 903 of file executor.c.

void executor_init ( testrunner_lite_options opts  ) 

Sets the remote host for executor

Parameters:
opts testrunner lite options

Definition at line 893 of file executor.c.

void handle_sigint ( int  signum  ) 

Definition at line 912 of file executor.c.

void handle_sigterm ( int  signum  ) 

Definition at line 926 of file executor.c.

void init_exec_data ( exec_data data  ) 

Initialize exec_data structure

Parameters:
data Pointer to data

Definition at line 825 of file executor.c.

void init_stream_data ( stream_data data,
int  allocate 
)

Initialize stream_data structure

Parameters:
data Pointer to data
allocate Number of bytes to allocate for string buffer

Definition at line 847 of file executor.c.

void kill_pgroup ( int  pgroup,
int  sig 
)

Send signal to process group of a test process

Parameters:
pgroup Process group ID for signal
sig Signal number

Definition at line 870 of file executor.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Thu Jan 27 07:39:35 2011 for testrunner-lite by  doxygen 1.6.3