PX4 Firmware
PX4 Autopilot Software http://px4.io
tests_main.c File Reference

Tests main file, loads individual tests. More...

#include "tests_main.h"
#include <px4_platform_common/px4_config.h>
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
Include dependency graph for tests_main.c:

Go to the source code of this file.

Macros

#define OPT_NOHELP   (1<<0)
 
#define OPT_NOALLTEST   (1<<1)
 
#define OPT_NOJIGTEST   (1<<2)
 
#define NTESTS   (sizeof(tests) / sizeof(tests[0]))
 

Functions

static int test_help (int argc, char *argv[])
 
static int test_runner (unsigned option)
 
static int test_all (int argc, char *argv[])
 
static int test_jig (int argc, char *argv[])
 
__EXPORT int tests_main (int argc, char *argv[])
 Executes system tests. More...
 

Variables

struct {
   const char *   name
 
   int(*   fn )(int argc, char *argv[])
 
   unsigned   options
 
tests []
 

Detailed Description

Tests main file, loads individual tests.

Author
Lorenz Meier lm@in.nosp@m.f.et.nosp@m.hz.ch

Definition in file tests_main.c.

Macro Definition Documentation

◆ NTESTS

#define NTESTS   (sizeof(tests) / sizeof(tests[0]))

Definition at line 133 of file tests_main.c.

Referenced by test_runner().

◆ OPT_NOALLTEST

#define OPT_NOALLTEST   (1<<1)

Definition at line 62 of file tests_main.c.

Referenced by test_all().

◆ OPT_NOHELP

#define OPT_NOHELP   (1<<0)

Definition at line 61 of file tests_main.c.

◆ OPT_NOJIGTEST

#define OPT_NOJIGTEST   (1<<2)

Definition at line 63 of file tests_main.c.

Referenced by test_jig().

Function Documentation

◆ test_all()

static int test_all ( int  argc,
char *  argv[] 
)
static

Definition at line 150 of file tests_main.c.

References OPT_NOALLTEST, and test_runner().

Here is the call graph for this function:

◆ test_help()

static int test_help ( int  argc,
char *  argv[] 
)
static

Definition at line 136 of file tests_main.c.

References name, and tests.

◆ test_jig()

static int test_jig ( int  argc,
char *  argv[] 
)
static

Definition at line 156 of file tests_main.c.

References OPT_NOJIGTEST, and test_runner().

Here is the call graph for this function:

◆ test_runner()

static int test_runner ( unsigned  option)
static

Definition at line 162 of file tests_main.c.

References fn, name, NTESTS, tests, and tests_main().

Referenced by test_all(), and test_jig().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tests_main()

int tests_main ( int  argc,
char *  argv[] 
)

Executes system tests.

Definition at line 252 of file tests_main.c.

References fn, name, and tests.

Referenced by test_runner().

Here is the caller graph for this function:

Variable Documentation

◆ fn

int(* fn) (int argc, char *argv[])

Definition at line 59 of file tests_main.c.

Referenced by px4io_main(), test_runner(), and tests_main().

◆ name

◆ options

unsigned options

Definition at line 60 of file tests_main.c.

◆ tests

const { ... } tests[]

Referenced by test_help(), test_runner(), and tests_main().