diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-11-01 11:24:59 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2017-11-01 11:24:59 -0400 |
commit | a031b83a09a8628435317a03f199cdc18b78262f (patch) | |
tree | bc017a96769ce6de33745b8b0b1304ccf38e9df0 /contrib/test/integration/results.yml | |
parent | 2b74391cd5281f6fdf391ff8ad50fd1490f6bf89 (diff) | |
download | podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.gz podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.bz2 podman-a031b83a09a8628435317a03f199cdc18b78262f.zip |
Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'contrib/test/integration/results.yml')
-rw-r--r-- | contrib/test/integration/results.yml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/contrib/test/integration/results.yml b/contrib/test/integration/results.yml new file mode 100644 index 000000000..c9a96abb1 --- /dev/null +++ b/contrib/test/integration/results.yml @@ -0,0 +1,62 @@ +--- +# vim-syntax: ansible + +- hosts: '{{ hosts | default("all") }}' + vars_files: + - "{{ playbook_dir }}/vars.yml" + vars: + _result_filepaths: [] # do not use + _dstfnbuff: [] # do not use + tasks: + - name: The crio_integration_filepath is required + tags: + - integration + set_fact: + _result_filepaths: "{{ _result_filepaths + [crio_integration_filepath] }}" + + - name: The crio_node_e2e_filepath is required + tags: + - e2e + set_fact: + _result_filepaths: "{{ _result_filepaths + [crio_node_e2e_filepath] }}" + + - name: Verify expectations + assert: + that: + - 'result_dest_basedir | default(False, True)' + - '_result_filepaths | default(False, True)' + - '_dstfnbuff == []' + - 'results_fetched is undefined' + + - name: Results directory exists + file: + path: "{{ result_dest_basedir }}" + state: directory + delegate_to: localhost + + - name: destination file paths are buffered for overwrite-checking and jUnit conversion + set_fact: + _dstfnbuff: > + {{ _dstfnbuff | + union( [result_dest_basedir ~ "/" ~ inventory_hostname ~ "/" ~ item | basename] ) }} + with_items: '{{ _result_filepaths }}' + + - name: Overwriting existing results assumed very very bad + fail: + msg: "Cowardly refusing to overwrite {{ item }}" + when: item | exists + delegate_to: localhost + with_items: '{{ _dstfnbuff }}' + + # fetch module doesn't support directories + - name: Retrieve results from all hosts + synchronize: + checksum: True # Don't rely on date/time being in sync + archive: False # Don't bother with permissions or times + copy_links: True # We want files, not links to files + recursive: True + mode: pull + dest: '{{ result_dest_basedir }}/{{ inventory_hostname }}/' # must end in / + src: '{{ item }}' + register: results_fetched + with_items: '{{ _result_filepaths }}' |