X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fhw_unit_tests.cc;h=99187c528b16c914e46ffdef704b160d5b435773;hb=5c9b8ea6569d3ba9319a3c4a9e1aadafce410714;hp=d6c933944c6bd3c88894bef1cdf7e1a67a533a95;hpb=60af3c9e625d903c1659c703bd1e41167a972c59;p=ric-app%2Fhw.git diff --git a/test/hw_unit_tests.cc b/test/hw_unit_tests.cc index d6c9339..99187c5 100644 --- a/test/hw_unit_tests.cc +++ b/test/hw_unit_tests.cc @@ -1,7 +1,7 @@ /* ================================================================================== - Copyright (c) 2018-2019 AT&T Intellectual Property. + Copyright (c) 2019-2020 AT&T Intellectual Property. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,20 +27,41 @@ #include #include "test_db.h" -//#include "test_rmr.h" +#include "test_rmr.h" #include "test_hc.h" - -#define HC_MSG_SIZE 512 +#include "test_subs.h" +#include "test_e2sm.h" using namespace std; int main(int argc, char* argv[]) { -// char rmr_seed[80]="RMR_SEED_RT=../src/routes.txt"; - char rmr_seed[80]="/tmp/routeinfo/routes.txt"; - putenv(rmr_seed); + char *aux; + aux=getenv("RMR_SEED_RT"); + if (aux==NULL || *aux == '\0'){ + + char rmr_seed[80]="RMR_SEED_RT=../init/routes.txt"; + putenv(rmr_seed); + } + //get configuration + XappSettings config; + //change the priority depending upon application requirement + config.loadDefaultSettings(); + config.loadEnvVarSettings(); + + //initialize rmr + std::unique_ptr rmr = std::make_unique("38000"); + rmr->xapp_rmr_init(true); + + //create a dummy xapp + std::unique_ptr dm_xapp = std::make_unique(std::ref(config),std::ref(*rmr)); + dm_xapp->Run(); testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + int res = RUN_ALL_TESTS(); + + + + return res; }