From 04f4cecaecb4fcaf0fa9fa717cb9dbd551d1835d Mon Sep 17 00:00:00 2001
From: Andreas Jaeger <jaegerandi@gmail.com>
Date: Thu, 1 Aug 2019 17:55:58 +0000
Subject: [PATCH] Revert "fetch-subunit-output: collect additional subunit
 files"

This reverts commit 8624201e0cc8b8860b4fe01994739a6828ec9615.

This breaks builds like in https://logs.opendev.org/01/673401/2/check/openstacksdk-tox-py36-tips/0e0bed9/job-output.txt.gz#_2019-08-01_17_04_29_549629

Change-Id: Ie4c8f966cfe72828a6ff9a7512948d6c55c62fde
---
 roles/fetch-subunit-output/README.rst         | 7 -------
 roles/fetch-subunit-output/defaults/main.yaml | 1 -
 roles/fetch-subunit-output/tasks/main.yaml    | 8 ++------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/roles/fetch-subunit-output/README.rst b/roles/fetch-subunit-output/README.rst
index 2540dbfb0..283b1d786 100644
--- a/roles/fetch-subunit-output/README.rst
+++ b/roles/fetch-subunit-output/README.rst
@@ -7,13 +7,6 @@ Collect subunit outputs
 
    Directory to work in. It has to be a fully qualified path.
 
-.. zuul:rolevar:: zuul_additional_subunit_dirs
-   :default: []
-
-   List of additional directories which contains subunit files
-   to collect. The content of zuul_work_dir is always checked,
-   so it should not be added here.
-
 .. 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
index 96c12e1dc..8cc97ff70 100644
--- a/roles/fetch-subunit-output/defaults/main.yaml
+++ b/roles/fetch-subunit-output/defaults/main.yaml
@@ -1,4 +1,3 @@
 ---
 tox_envlist: ""
-zuul_additional_subunit_dirs: []
 zuul_work_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
diff --git a/roles/fetch-subunit-output/tasks/main.yaml b/roles/fetch-subunit-output/tasks/main.yaml
index 2badeeb1c..496ed7d43 100644
--- a/roles/fetch-subunit-output/tasks/main.yaml
+++ b/roles/fetch-subunit-output/tasks/main.yaml
@@ -9,15 +9,11 @@
     - testr_command.rc == 0
     - testr_command.stdout_lines
   block:
-    - name: Get the list of directories with subunit files
-      set_fact:
-        subunit_dirs: "{{ [ zuul_work_dir ] + zuul_additional_subunit_dirs }}"
 
     - name: Generate subunit file
       shell:
-        cmd: "{{ testr_command.stdout_lines[0] }} last --subunit >>{{ zuul_work_dir }}/testrepository.subunit"
-        chdir: "{{ item }}"
-      loop: "{{ subunit_dirs }}"
+        cmd: "{{ testr_command.stdout_lines[0] }} last --subunit > ./testrepository.subunit"
+        chdir: "{{ zuul_work_dir }}"
 
     - name: Process and fetch subunit results
       include: process.yaml