Commit 689fb352 authored by ismail's avatar ismail

CI: fix in the dsTester result check script

Signed-off-by: default avatarismail <mohammed.ismail@openairinterface.org>
parent bdf8e1c4
......@@ -36,16 +36,17 @@ try:
result = re.search('(?:\/.+?\/)(.+?)(?:\/.+)', str(line))
if result:
result1 = re.search('^(.*/)([^/]*)$', str(result.group(0)))
subprocess.check_output(f'cp {result1.group(1)}* DS-TEST-RESULTS/', stderr=subprocess.STDOUT, shell=True, universal_newlines=True)
filename = re.search('[^/]*$', str(result1.group(0)))
subprocess.check_output(f'cp -r {result1.group(1)}* DS-TEST-RESULTS/', shell=True, universal_newlines=True)
locexist = True
except IOError:
sys.exit("File not accessible to check DSTester Summary: DS-TEST-RESULTS/dsTester_Summary.txt")
if locexist:
try:
with open(cwd + '/DS-TEST-RESULTS/dcamf.yaml') as f:
data = yaml.load(f)
with open(cwd + f'/DS-TEST-RESULTS/{filename.group(0)}') as f:
data = yaml.full_load(f)
if data["final-result"] == 'fail':
sys.exit('DsTester final result FAILED')
except IOError:
sys.exit("File not accessible to check DSTester result: DS-TEST-RESULTS/dcamf.yaml")
sys.exit(f'File not accessible to check DSTester result: DS-TEST-RESULTS/{filename.group(0)}')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment