Adjust check for .stestr directory

stestr can leave a .stestr directory from which subunit cannot be
generated after an initial run that fails due to a python import/parse
error.

In order to determine if a run will be able to generate subunit output,
check for the '.stestr/failing' file.

NOTE: This is **NOT** an indication of a failing run. It's a file that
will be present in the .stestr directory if an entire run has happened
and acts as a marker that the directory has enough information to export
a subunit stream.

Change-Id: Id1dd696c81da09e9d2e5fe350337b73eb0646d2d
This commit is contained in:
Monty Taylor 2018-01-10 17:21:01 -06:00
parent 3d0550a96c
commit 2a0f06147e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594

View File

@ -1,6 +1,10 @@
# NOTE(mordred) Check for the failing file in the .stestr directory instead of
# just the directory. An stestr run that fails due to python parsing errors
# will leave a directory but with no test results, which will result in an
# error in the subunit generation phase.
- name: Check for stestr directory
stat:
path: "{{ zuul_work_dir }}/.stestr"
path: "{{ zuul_work_dir }}/.stestr/failing"
register: stestr_stat
- name: Generate stestr subunit file