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: ...@@ -36,16 +36,17 @@ try:
result = re.search('(?:\/.+?\/)(.+?)(?:\/.+)', str(line)) result = re.search('(?:\/.+?\/)(.+?)(?:\/.+)', str(line))
if result: if result:
result1 = re.search('^(.*/)([^/]*)$', str(result.group(0))) 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 locexist = True
except IOError: except IOError:
sys.exit("File not accessible to check DSTester Summary: DS-TEST-RESULTS/dsTester_Summary.txt") sys.exit("File not accessible to check DSTester Summary: DS-TEST-RESULTS/dsTester_Summary.txt")
if locexist: if locexist:
try: try:
with open(cwd + '/DS-TEST-RESULTS/dcamf.yaml') as f: with open(cwd + f'/DS-TEST-RESULTS/{filename.group(0)}') as f:
data = yaml.load(f) data = yaml.full_load(f)
if data["final-result"] == 'fail': if data["final-result"] == 'fail':
sys.exit('DsTester final result FAILED') sys.exit('DsTester final result FAILED')
except IOError: 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