X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=near-rt-ric-simulator%2Fcommon%2Ftestcase_common.sh;h=581c2748fa70d468c87da214e145552eba322f2d;hb=1eeda7f570212b728bd18a5684d958bab76fa019;hp=7d55b156c7bd3150bb64e831b91ce1515081e1f5;hpb=136e826cabebb7e4188c68ec118bb11632f8139a;p=nonrtric.git diff --git a/near-rt-ric-simulator/common/testcase_common.sh b/near-rt-ric-simulator/common/testcase_common.sh index 7d55b156..581c2748 100755 --- a/near-rt-ric-simulator/common/testcase_common.sh +++ b/near-rt-ric-simulator/common/testcase_common.sh @@ -117,9 +117,19 @@ fi echo "" echo "Building images for the simulators" -curdir=$PWD -cd $SIM_GROUP -cd ../ric-plt/a1 +if [ -z "$SIM_DIR" ]; then + SIM_DIR=$(find . -type d -path "*a1-interface/near-rt-ric-simulator/scripts*" 2>/dev/null -print -quit) + if [ ! -d $SIM_DIR ]; then + echo "Trying to set env var SIM_DIR to dir 'a1-interface/near-rt-ric-simulator/scripts' in the sim repo, but failed." + echo "It might be that you did not download the repository of the near-rt-ric simulator.In that case, run the command:" + echo "git clone 'https://gerrit.o-ran-sc.org/oransc/sim/a1-interface'" + echo "Otherwise, please set the SIM_DIR manually in the test_env.sh" + exit 1 + else + echo "SIM_DIR auto set to: " $SIM_DIR + fi +fi +cd $SIM_DIR docker build -t ric-simulator:latest . &> /dev/null cd $curdir