#101 Support for fetching tests from remote repos
Merged 6 years ago by astepano. Opened 6 years ago by psss.
psss/standard-test-roles repos  into  master

@@ -17,3 +17,27 @@ 

       is affecting the test subject (it's similar as rebuilding an

       rpm package to be tested) so this should be used with caution

       and only when necessary.

+  * repositories: A list of dictionaries defining git repos with

+    tests to be fetched. Available options are consistent with the

+    ansible git module syntax:

+      url ... repository url (required)

+      dest ... destination directory (required)

+      version ... desired branch (optional, defaults to master)

+ 

+ Example usage:

+ 

+ - hosts: localhost

+   roles:

+   - role: standard-test-beakerlib

+     tags:

+     - classic

+     repositories:

+     - repo: "https://src.fedoraproject.org/tests/shell.git"

+       dest: "shell"

+     tests:

+     - shell/func

+     - shell/login

+     - shell/smoke

+     required_packages:

+     - expect

+     - which

@@ -62,6 +62,16 @@ 

      - beakerlib

      - restraint-rhts

      - rsync

+ 

+   - name: Fetch tests from remote repositories

+     git:

+       repo: "{{ item.repo }}"

+       dest: "{{ item.dest }}"

+       version: "{{ item.version | default('master') }}"

+     with_items:

+       "{{ repositories }}"

+     when: repositories is defined

+ 

    delegate_to: executor

  

  - block:

Add a new variable "repositories" which can be used to easily
fetch tests from remote repos for execution. Useful especially
when several packages share the same test coverage.

Example usage:

repositories:
- repo: "https://src.fedoraproject.org/tests/shell.git"
  dest: "shell"
tests:
- shell/func
- shell/login
- shell/smoke

rebased onto 43a95acc04e14a952e0db18cb43bed39d7fea004

6 years ago

rebased onto 7ec022c

6 years ago

Pull-Request has been merged by astepano

6 years ago