Add script to prepare results.yml
Resolves: rhbz#1954686 This update is to conform to STI standards
This commit is contained in:
parent
44e720a583
commit
341c8ac4b6
@ -95,6 +95,20 @@
|
||||
--multihost-config=/tmp/mhc.yaml \
|
||||
"{{ test_dir }}" 1> "{{ remote_artifacts }}/test.log"
|
||||
|
||||
- name: Prepare results.yml in STI format
|
||||
shell: |
|
||||
echo "results:" > "{{ remote_artifacts }}/results.yml"
|
||||
IFS=$'\n'
|
||||
for i in `awk '/collected /,/=====/' "{{ remote_artifacts }}/test.log" | sed '1d;$d'`
|
||||
do
|
||||
echo $i | grep -q PASSED && res=pass
|
||||
echo $i | grep -q FAILED && res=fail
|
||||
echo $i | grep -q ERROR && res=error
|
||||
testname = `echo $i |awk -F\:\: '{print $3}' | cut -f1 -d" "`
|
||||
echo "- {result: $res, test: $testname}" >> "{{ remote_artifacts }}/results.yml"
|
||||
done
|
||||
unset IFS
|
||||
|
||||
always:
|
||||
- name: copy sssd logs to "{{ remote_artifacts }}"
|
||||
command: cp -a /var/log/sssd {{ remote_artifacts }}
|
||||
|
Loading…
Reference in New Issue
Block a user