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 9e17011
    script: run-lang-coverage-test --lang "{{ item }}" --path "{{ path_prefix }}" --artifactsdir "{{ remote_artifacts }}" {{ "" if coverage.values is not defined or coverage[item].name is not defined else "--name " + coverage[item].name }} {{ "" if coverage.values is not defined or coverage[item].exclude is not defined else '--exclude "' + (coverage[item].exclude | join('" --exclude "')) + '"'}} {{ "" if coverage.values is not defined or coverage[item].include is not defined else '--include "' + (coverage[item].include | join('" --include "')) + '"'}}
Akira TAGOH 0fac32a
    with_items:
Akira TAGOH fb2a5b3
    - "{{ coverage if coverage.keys is not defined else coverage.keys()|list }}"
Akira TAGOH 0fac32a
  - name: generic family assignment
Akira TAGOH 9e17011
    when: families is defined
Akira TAGOH 83e3a89
    script: run-family-test --lang {{ item.lang }} --family '{{ item.family }}' --alias {{ item.alias }} --artifactsdir {{ remote_artifacts }} --package {{ package if item.package is not defined else item.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
      role_result_failed: "{{ test_results.stdout != 'PASS' }}"
Akira TAGOH 0fac32a
      role_result_msg: "{{ test_results.stderr|d('test execution error.') }}"
Akira TAGOH 0fac32a
Akira TAGOH 0fac32a
  - include_role:
Akira TAGOH 0fac32a
      name: str-common-final