Blame tests/roles/custom-test-fonts/tasks/main.yml~

Akira TAGOH 0fac32a
---
Akira TAGOH 0fac32a
Akira TAGOH 0fac32a
- block:
Akira TAGOH 0fac32a
  - name: language coverage
Akira TAGOH 0fac32a
    script: run-lang-coverage-test --lang "{{ item }}" --path "{{ path_prefix }}" --artifactsdir "{{ remote_artifacts }}"
Akira TAGOH 0fac32a
    with_items:
Akira TAGOH 0fac32a
    - "{{ coverage }}"
Akira TAGOH 0fac32a
  - name: generic family assignment
Akira TAGOH 0fac32a
    script: run-family-test --lang {{ item.lang }} --family '{{ item.family }}' --alias {{ item.alias }} --artifactsdir {{ remote_artifacts }} --package {{ package }}
Akira TAGOH 0fac32a
    with_items:
Akira TAGOH 0fac32a
    - "{{ families }}"
Akira TAGOH 0fac32a
Akira TAGOH 0fac32a
  - name: Check the results
Akira TAGOH 0fac32a
    shell: |
Akira TAGOH 0fac32a
      log="{{ remote_artifacts }}/test.log"
Akira TAGOH 0fac32a
      if [ ! -f "$log" ]; then
Akira TAGOH 0fac32a
          echo ERROR
Akira TAGOH 0fac32a
          echo "Test results not found." 1>&2
Akira TAGOH 0fac32a
      elif grep ^ERROR "$log" 1>&2; then
Akira TAGOH 0fac32a
          echo ERROR
Akira TAGOH 0fac32a
      elif grep ^FAIL "$log" 1>&2; then
Akira TAGOH 0fac32a
          echo FAIL
Akira TAGOH 0fac32a
      elif grep -q ^PASS "$log"; then
Akira TAGOH 0fac32a
          echo PASS
Akira TAGOH 0fac32a
      else
Akira TAGOH 0fac32a
          echo ERROR
Akira TAGOH 0fac32a
          echo "No test results found." 1>&2
Akira TAGOH 0fac32a
      fi
Akira TAGOH 0fac32a
    register: test_results
Akira TAGOH 0fac32a
Akira TAGOH 0fac32a
  - name: Set role result
Akira TAGOH 0fac32a
    set_fact:
Akira TAGOH 0fac32a
      role_result: "{{ test_results.stdout }}"
Akira TAGOH 0fac32a
      role_message: "{{ test_results.stderr|d('test execution error.') }}"
Akira TAGOH 0fac32a
Akira TAGOH 0fac32a
  - name: check
Akira TAGOH 0fac32a
    vars:
Akira TAGOH 0fac32a
      msg: |
Akira TAGOH 0fac32a
         Result: {{ role_resulta|d('Undefined') }}
Akira TAGOH 0fac32a
         {{ role_message|d('None') }}
Akira TAGOH 0fac32a
    debug:
Akira TAGOH 0fac32a
      msg: "{{ msg.split('\n') }}"
Akira TAGOH 0fac32a
    failed_when: role_result == 'ERROR'
Akira TAGOH 0fac32a
Akira TAGOH 0fac32a
  - include_role:
Akira TAGOH 0fac32a
      name: str-common-final