From 9f4efe98e10c9d553dc8a15bd7b84584e1118684 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 16 Jan 2018 01:10:56 +0000 Subject: [PATCH] Revert "Add consolidated role for processing subunit" This reverts commit ebdcf57fb088ba09db51a1f2bcbc915731d04bd2. Change-Id: Icfa811571ec7c26617e0f8e9db086001fc0bc81f --- playbooks/unittests/post.yaml | 3 +- roles/fetch-subunit-output/README.rst | 12 ----- roles/fetch-subunit-output/defaults/main.yaml | 2 - roles/fetch-subunit-output/tasks/main.yaml | 48 ------------------- roles/fetch-subunit-output/tasks/process.yaml | 19 -------- 5 files changed, 2 insertions(+), 82 deletions(-) delete mode 100644 roles/fetch-subunit-output/README.rst delete mode 100644 roles/fetch-subunit-output/defaults/main.yaml delete mode 100644 roles/fetch-subunit-output/tasks/main.yaml delete mode 100644 roles/fetch-subunit-output/tasks/process.yaml diff --git a/playbooks/unittests/post.yaml b/playbooks/unittests/post.yaml index a19836486..dcf3709e8 100644 --- a/playbooks/unittests/post.yaml +++ b/playbooks/unittests/post.yaml @@ -1,3 +1,4 @@ - hosts: all roles: - - fetch-subunit-output + - fetch-testr-output + - fetch-stestr-output diff --git a/roles/fetch-subunit-output/README.rst b/roles/fetch-subunit-output/README.rst deleted file mode 100644 index 1d9c992bb..000000000 --- a/roles/fetch-subunit-output/README.rst +++ /dev/null @@ -1,12 +0,0 @@ -Collect subunit outputs - -**Role Variables** - -.. zuul:rolevar:: zuul_work_dir - :default: {{ zuul.project.src_dir }} - - Directory to work in - -.. zuul:rolevar:: tox_envlist - - tox environment that was used to run the tests originally. diff --git a/roles/fetch-subunit-output/defaults/main.yaml b/roles/fetch-subunit-output/defaults/main.yaml deleted file mode 100644 index a0afa22c5..000000000 --- a/roles/fetch-subunit-output/defaults/main.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -zuul_work_dir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/fetch-subunit-output/tasks/main.yaml b/roles/fetch-subunit-output/tasks/main.yaml deleted file mode 100644 index 195b02a5d..000000000 --- a/roles/fetch-subunit-output/tasks/main.yaml +++ /dev/null @@ -1,48 +0,0 @@ -- name: Check for stestr directory - stat: - path: "{{ zuul_work_dir }}/.stestr" - register: stestr_stat - -- name: Generate stestr subunit file - shell: - cmd: ".tox/{{ tox_envlist }}/bin/stestr last --subunit > ./testrepository.subunit" - chdir: "{{ zuul_work_dir }}" - when: - - tox_envlist is defined - - stestr_stat.stat.exists - -- name: Generate stestr subunit file - shell: - cmd: "stestr last --subunit > ./testrepository.subunit" - chdir: "{{ zuul_work_dir }}" - when: - - tox_envlist is not defined - - stestr_stat.stat.exists - -- name: Check for testr directory - stat: - path: "{{ zuul_work_dir }}/.stestr" - register: testr_stat - when: not stestr_stat.stat.exists - -- name: Generate testrepository.subunit file - shell: - cmd: ".tox/{{ tox_envlist }}/bin/testr last --subunit > ./testrepository.subunit" - chdir: "{{ zuul_work_dir }}" - when: - - tox_envlist is defined - - not stestr_stat.stat.exists - - testr_stat.stat.exists - -- name: Generate testrepository.subunit file - shell: - cmd: "testr last --subunit > ./testrepository.subunit" - chdir: "{{ zuul_work_dir }}" - when: - - tox_envlist is not defined - - not stestr_stat.stat.exists - - testr_stat.stat.exists - -- name: Process and fetch subunit results - include: process.yaml - when: stestr_stat.stat.exists or testr_stat.stat.exists diff --git a/roles/fetch-subunit-output/tasks/process.yaml b/roles/fetch-subunit-output/tasks/process.yaml deleted file mode 100644 index 4f401bb61..000000000 --- a/roles/fetch-subunit-output/tasks/process.yaml +++ /dev/null @@ -1,19 +0,0 @@ -- name: Generate testr_results.html file - # TODO(pabelanger): We cannot depend on /usr/os-testr-env here!!! - command: "/usr/os-testr-env/bin/subunit2html ./testrepository.subunit testr_results.html" - args: - chdir: "{{ zuul_work_dir }}" - -- name: Compress testrepository.subunit file - archive: - path: "{{ zuul_work_dir }}/testrepository.subunit" - -- name: Collect test-results - synchronize: - dest: "{{ zuul.executor.log_root }}" - mode: pull - src: "{{ zuul_work_dir }}/{{ item }}" - verify_host: true - with_items: - - "*testr_results.html.gz" - - "*testrepository.subunit.gz"