27#ifndef GNUNET_TESTING_NG_LIB_H
28#define GNUNET_TESTING_NG_LIB_H
51 const char *process_label,
79 char *
const script_argv[],
92#define GNUNET_TESTING_SIMPLE_TRAITS(op, prefix) \
93 op (prefix, process, struct GNUNET_OS_Process *)
101#define GNUNET_TESTING_INDEXED_TRAITS(op, prefix) \
102 op (prefix, uint32, const uint32_t) \
103 op (prefix, uint64, const uint64_t) \
104 op (prefix, int64, const int64_t) \
105 op (prefix, uint, const unsigned int) \
106 op (prefix, string, const char) \
107 op (prefix, uuid, const struct GNUNET_Uuid) \
108 op (prefix, time, const struct GNUNET_TIME_Absolute) \
109 op (prefix, absolute_time, const struct GNUNET_TIME_Absolute) \
110 op (prefix, relative_time, const struct GNUNET_TIME_Relative)
static struct GNUNET_TIME_Relative duration
Option '-d': duration of the mapping.
Convenience API for writing testcases for GNUnet.
#define GNUNET_TESTING_MAKE_DECL_SIMPLE_TRAIT(prefix, name, type)
Create headers for a trait with name name for statically allocated data of type type.
#define GNUNET_TESTING_MAKE_DECL_INDEXED_TRAIT(prefix, name, type)
Create headers for a trait with name name for statically allocated data of type type.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_sleep(const char *label, struct GNUNET_TIME_Relative duration)
Sleep for duration.
struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_signal(const char *label, const char *process_label, int signal)
Meta-header for next-generation testing logic.
const struct GNUNET_TESTING_Command GNUNET_TESTING_cmd_exec_bash_script(const char *label, const char *script, char *const script_argv[], int argc, GNUNET_ChildCompletedCallback cb)
Command to execute a script synchronously.
#define GNUNET_TESTING_INDEXED_TRAITS(op, prefix)
Call op on all indexed traits.
#define GNUNET_TESTING_SIMPLE_TRAITS(op, prefix)
Call op on all simple traits.
void(* GNUNET_ChildCompletedCallback)(void *cls, enum GNUNET_OS_ProcessStatusType type, long unsigned int exit_code)
Defines a GNUNET_ChildCompletedCallback which is sent back upon death or completion of a child proces...
A command to be run by the interpreter.
struct GNUNET_TESTING_CommandLabel label
Label for the command.
Time for relative time used by GNUnet, in microseconds.