From 2a0f06147e911a9987ee1e44ebdb2714e2b55e81 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 10 Jan 2018 17:21:01 -0600 Subject: [PATCH] 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 --- roles/fetch-subunit-output/tasks/main.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/fetch-subunit-output/tasks/main.yaml b/roles/fetch-subunit-output/tasks/main.yaml index a552d3edf..ae0d74323 100644 --- a/roles/fetch-subunit-output/tasks/main.yaml +++ b/roles/fetch-subunit-output/tasks/main.yaml @@ -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