Compress testrepository.subunit in fetch-testr-output

It make sense to compress subunit file we want from tox before
uploading it to our log server.

Change-Id: Ibb1b6cedce0350f8c2baf40718a909f30ce954d7
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-07-18 13:41:54 -04:00
parent 05bebdfb29
commit aefae32107
No known key found for this signature in database
GPG Key ID: 611A80832067AF38
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,14 @@
- name: Register subunit file
stat:
path: "{{ zuul_work_dir }}/testrepository.subunit"
register: p
- name: Compress subunit file to archive to logs server
archive:
path: "{{ p.stat.path }}"
when:
- p.stat.exists
- name: Collect test-results
synchronize:
dest: "{{ zuul.executor.log_root }}"

View File

@ -39,7 +39,6 @@
$bin_path/testr last --subunit > ./testrepository.subunit
fi
/usr/os-testr-env/bin/subunit2html ./testrepository.subunit testr_results.html
gzip -9 ./testrepository.subunit
gzip -9 ./testr_results.html
rancount=$($bin_path/testr last | sed -ne 's/Ran \([0-9]\+\).*tests in.*/\1/p')