X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fhw_unit_tests.cc;h=99187c528b16c914e46ffdef704b160d5b435773;hb=refs%2Fchanges%2F29%2F4029%2F1;hp=a1bd3ca4d96dd79b44fa459ca476723ef5177e0c;hpb=65ac2f814cdd9dc0f71ee35868dc6c75a7f69d6a;p=ric-app%2Fhw.git diff --git a/test/hw_unit_tests.cc b/test/hw_unit_tests.cc index a1bd3ca..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,19 +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"; - 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; }