libabigail
Loading...
Searching...
No Matches
test_task Struct Reference

The task that performs the tests. More...

#include <test-read-common.h>

Inheritance diagram for test_task:
[legend]

Public Member Functions

 test_task (const InOutSpec &s, string &a_out_abi_base, string &a_in_elf_base, string &a_in_abi_base)
 Constructor.
bool run_abi_self_comparison (const string &extargs="")
 Spawn `abidw –abidiff` tool appending extargs argument.
bool run_diff ()
 Spawn external `diff` command.
bool serialize_corpus (const string &out_abi_path, corpus_sptr corp)
 Serialize the abixml out_abi_path file.
void set_in_abi_path ()
 A setter for `in_abi_path` field. The `in_abi_path` is the full path for the expected abixml file.
void set_in_elf_path ()
 A setter for `in_elf_path` field. The `in_elf_path` is the full path for input object in the tests container InOutSpec.
void set_in_options ()
 A setter for the in_options field.
void set_in_public_headers_path ()
 A setter for `in_public_headers_path` field. The `in_public_headers_path` is the full path for headers entry in the tests container InOutSpec.
void set_in_suppr_spec_path ()
 A setter for `in_suppr_spec_path` field. The `in_suppr_spec_path` is the full path for suppression entry in the tests container InOutSpec.
bool set_out_abi_path ()
 A setter for `out_abi_path` field. The `out_abi_path` is the full path for output of abixml file.
Public Member Functions inherited from task
virtual void perform ()=0

Public Attributes

string error_message
string in_abi_base
string in_abi_path
string in_elf_base
string in_elf_path
string in_options
string in_public_headers_path
string in_suppr_spec_path
string initial_command
bool is_ok
string out_abi_base
string out_abi_path
InOutSpec spec

Detailed Description

The task that performs the tests.

Definition at line 48 of file test-read-common.h.

Constructor & Destructor Documentation

◆ test_task()

test_task ( const InOutSpec & s,
string & a_out_abi_base,
string & a_in_elf_base,
string & a_in_abi_base )

Constructor.

Task to be executed for each test entry in InOutSpec.

Parameters
InOutSpecthe set of tests.
a_out_abi_basethe output base directory for abixml files.
a_in_elf_basethe input base directory for object files.
a_in_elf_basethe input base directory for expected abixml files.

Definition at line 44 of file test-read-common.cc.

◆ ~test_task()

virtual ~test_task ( )
inlinevirtual

Definition at line 157 of file test-read-common.h.

Member Function Documentation

◆ run_abi_self_comparison()

bool run_abi_self_comparison ( const string & extargs = "")

Spawn `abidw –abidiff` tool appending extargs argument.

Thew input file object used by `abidw` will be specified by `in_elf_path'.

Parameters
extargsthe extra argument(s) passed to `abidw` tool.
Returns
true if `abidw` tool was executed correctly. Otherwise `error_message` shows the full path of the input file object and the full output path for the abixml file.

Definition at line 95 of file test-read-common.cc.

◆ run_diff()

bool run_diff ( )

Spawn external `diff` command.

The files to be compared are: abixml generated by the input object file and the expected abixml file stored in `in_abi_path`.

Returns
true if `diff` command didn't find defences. Otherwise `error_message` shows the full path of the input file object and the full output path for the abixml file.

Definition at line 128 of file test-read-common.cc.

◆ serialize_corpus()

bool serialize_corpus ( const string & out_abi_path,
corpus_sptr corp )

Serialize the abixml out_abi_path file.

Parameters
out_abi_paththe abixml path file.
corpthe ABI corpus.
Returns
true if abixml file was serialized successfully. Otherwise `error_message` is set with out_abi_path and false is returned.

Definition at line 64 of file test-read-common.cc.

◆ set_in_abi_path()

void set_in_abi_path ( )
inline

A setter for `in_abi_path` field. The `in_abi_path` is the full path for the expected abixml file.

Definition at line 138 of file test-read-common.h.

◆ set_in_elf_path()

void set_in_elf_path ( )
inline

A setter for `in_elf_path` field. The `in_elf_path` is the full path for input object in the tests container InOutSpec.

Definition at line 71 of file test-read-common.h.

◆ set_in_options()

void set_in_options ( )
inline

A setter for the in_options field.

The in_options is the additional option to be passed to the abidw command at run time.

Definition at line 108 of file test-read-common.h.

◆ set_in_public_headers_path()

void set_in_public_headers_path ( )
inline

A setter for `in_public_headers_path` field. The `in_public_headers_path` is the full path for headers entry in the tests container InOutSpec.

Definition at line 94 of file test-read-common.h.

◆ set_in_suppr_spec_path()

void set_in_suppr_spec_path ( )
inline

A setter for `in_suppr_spec_path` field. The `in_suppr_spec_path` is the full path for suppression entry in the tests container InOutSpec.

Definition at line 81 of file test-read-common.h.

◆ set_out_abi_path()

bool set_out_abi_path ( )
inline

A setter for `out_abi_path` field. The `out_abi_path` is the full path for output of abixml file.

Returns
true if `out_abi_path` is a valid directory.

Definition at line 119 of file test-read-common.h.

Member Data Documentation

◆ error_message

string error_message

Definition at line 53 of file test-read-common.h.

◆ in_abi_base

string in_abi_base

Definition at line 56 of file test-read-common.h.

◆ in_abi_path

string in_abi_path

Definition at line 59 of file test-read-common.h.

◆ in_elf_base

string in_elf_base

Definition at line 55 of file test-read-common.h.

◆ in_elf_path

string in_elf_path

Definition at line 58 of file test-read-common.h.

◆ in_options

string in_options

Definition at line 62 of file test-read-common.h.

◆ in_public_headers_path

string in_public_headers_path

Definition at line 61 of file test-read-common.h.

◆ in_suppr_spec_path

string in_suppr_spec_path

Definition at line 60 of file test-read-common.h.

◆ initial_command

string initial_command

Definition at line 52 of file test-read-common.h.

◆ is_ok

bool is_ok

Definition at line 50 of file test-read-common.h.

◆ out_abi_base

string out_abi_base

Definition at line 54 of file test-read-common.h.

◆ out_abi_path

string out_abi_path

Definition at line 63 of file test-read-common.h.

◆ spec

InOutSpec spec

Definition at line 51 of file test-read-common.h.


The documentation for this struct was generated from the following files: