#37 Revert "roles: Clear the remote_artifacts directory before use"
Merged 6 years ago by stefw. Opened 6 years ago by merlinm.
Unknown source dont-clear-artifacts  into  master

@@ -86,9 +86,6 @@

      -e 's|/usr/share/rhts-library/rhtslib.sh|/usr/local/bin/beakerlib.sh|g'

      -e 's|/usr/bin/rstrnt-|/usr/local/bin/rstrnt-|g'

  

- - name: Clear artifacts directory

-   file: path={{ remote_artifacts }} state=absent

- 

  - name: Make artifacts directory

    file: path={{ remote_artifacts }} state=directory owner=root mode=755 recurse=yes

  

@@ -166,9 +166,6 @@

  

    when: sshd_check|failed

  

- - name: Clear artifacts directory

-   file: path={{ remote_artifacts }} state=absent

- 

  - name: Make artifacts directory

    file: path={{ remote_artifacts }} state=directory owner=root mode=755 recurse=yes

  

This reverts commit 43ce114.

It turns out PR#27 (which merged the above mentioned commit) causes results to be dropped from the summary in the primary test.log artifact when the test playbook applies more than one role.

It is the responsibility of the user to clean the remote_artifacts and local artifacts directories when re-running tests on a target.

See https://upstreamfirst.fedorainfracloud.org/bash/pull-request/2 for discussion of this problem, and https://upstreamfirst.fedorainfracloud.org/bash/blob/master/f/tests.yml for an example that demonstrates the problem when run with the classic tag.

I think in the future we could use temp files a better ansible script to avoid these problems. But until then this unbreaks broken tests.

Pull-Request has been merged by stefw

6 years ago