2017-04-18 23:04:21 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include "src/json/json.h"
|
2017-04-22 12:07:11 +00:00
|
|
|
#include "src/loaders/loaders.h"
|
2017-04-18 23:04:21 +00:00
|
|
|
|
2017-06-09 03:49:13 +00:00
|
|
|
int main( )
|
2017-04-18 23:04:21 +00:00
|
|
|
{
|
2017-06-23 19:24:11 +00:00
|
|
|
bool verbose = true;
|
2017-04-29 21:35:03 +00:00
|
|
|
// A Plan is made up of Tasks, and a Suite is made up of Units.
|
|
|
|
// A Plan declares what units are executed and a Suite declares the definitions of those units.
|
2017-08-06 23:26:51 +00:00
|
|
|
Conf configuration = Conf("/home/phanes/development/internal/Examplar/conf/config.json", verbose );
|
2017-04-19 05:50:34 +00:00
|
|
|
|
2017-04-29 21:35:03 +00:00
|
|
|
// load the configuration file which contains filepaths to definitions of a plan and definitions of units.
|
|
|
|
std::string definitions_file = configuration.get_units_path();
|
|
|
|
std::string plan_file = configuration.get_plan_path();
|
2017-04-19 06:27:54 +00:00
|
|
|
|
2017-06-18 14:39:46 +00:00
|
|
|
Suite available_definitions;
|
2017-06-23 19:24:11 +00:00
|
|
|
available_definitions.load_units_file( definitions_file, verbose );
|
2017-06-11 19:14:45 +00:00
|
|
|
|
2017-06-23 20:02:19 +00:00
|
|
|
Plan plan;
|
2017-06-25 06:28:22 +00:00
|
|
|
plan.load_plan_file( plan_file, verbose );
|
2017-06-11 19:14:45 +00:00
|
|
|
|
2017-06-25 22:50:14 +00:00
|
|
|
plan.load_definitions( available_definitions, verbose );
|
2017-04-19 05:50:34 +00:00
|
|
|
|
2017-06-27 02:27:24 +00:00
|
|
|
std::cout << "Ready to execute all tasks in Plan." << std::endl;
|
|
|
|
|
|
|
|
plan.execute( verbose );
|
|
|
|
|
2017-04-18 23:04:21 +00:00
|
|
|
return 0;
|
|
|
|
}
|