22#include <gtest/gtest.h>
27#include <baseapp/run.h>
28#include <config/yaml.h>
29#include <core/exception.h>
30#include <utils/misc/string_conversions.h>
45main(
int argc,
char **argv)
47 ::testing::InitGoogleTest(&argc, argv);
53 printf(
"Config path: %s\n", cfg_path.c_str());
55 config.
load(cfg_path.c_str());
58 std::string config_path = config.
get_string(
"gtest/config");
62 fawkes_argv =
new char *[5];
63 fawkes_argv[0] =
new char[7];
64 strcpy(fawkes_argv[0],
"fawkes");
65 fawkes_argv[1] =
new char[3];
66 strcpy(fawkes_argv[1],
"-p");
67 fawkes_argv[2] =
new char[128];
68 strcpy(fawkes_argv[2], plugins.c_str());
69 fawkes_argv[3] =
new char[3];
70 strcpy(fawkes_argv[3],
"-c");
71 fawkes_argv[4] =
new char[128];
72 strcpy(fawkes_argv[4], config_path.c_str());
74 if (!fawkes::runtime::init(5, fawkes_argv, retval)) {
77 fawkes::runtime::run();
78 fawkes::runtime::cleanup();
82 printf(
"Fawkes Test execution ended.\n");
virtual void load(const char *file_path)=0
Load configuration.
virtual std::string get_string(const char *path)=0
Get value from configuration which is of type string.
Base class for exceptions in Fawkes.
static std::string resolve_path(std::string s)
Resolves path-string with @...@ tags.
Configuration store using YAML documents.