-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
52 lines (43 loc) · 1.09 KB
/
test.cpp
File metadata and controls
52 lines (43 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <maiken.hpp>
#include "mkn/kul/signal.hpp"
#include "mkn/kul/yaml.hpp"
std::vector<std::string> const yamls = {R"(
hdf5
)",
R"(
hdf5:
roots:
incroot
paths:
incpath
files:
incfile
)"};
void test(auto const &string) {}
int main(int argc, char *argv[]) {
mkn::kul::Signal sig;
char *argv2[2] = {argv[0], (char *)"-O"};
auto app = (maiken::Application::CREATE(2, argv2))[0];
auto loader(maiken::ModuleLoader::LOAD(*app));
for (auto const &yArgs : yamls)
try {
KLOG(INF) << yArgs;
YAML::Node node = mkn::kul::yaml::String(yArgs).root();
KLOG(INF) << node;
loader->module()->init(*app, node);
loader->module()->compile(*app, node);
loader->module()->link(*app, node);
loader->module()->pack(*app, node);
} catch (const mkn::kul::Exception &e) {
KLOG(ERR) << e.what();
return 2;
} catch (const std::exception &e) {
KERR << e.what();
return 3;
} catch (...) {
KERR << "UNKNOWN EXCEPTION TYPE CAUGHT";
return 5;
}
loader->unload();
return 0;
}