target_requirements.jinja 646 B

123456789101112131415161718192021
  1. {%- macro Requirements(dir_macro, requirements) -%}
  2. {%- set cpu_reqs = requirements|select('startsWith', 'cpu:') -%}
  3. {%- if cpu_reqs|length -%}
  4. {%- set cpu_req = cpu_reqs|first -%}
  5. {{ dir_macro }}(
  6. TEST
  7. {{ requirements[0] }}
  8. PROPERTY
  9. PROCESSORS
  10. {{ cpu_req|replace('cpu:', '') }}
  11. )
  12. {% endif -%}
  13. {%- endmacro -%}
  14. {%- if current_target.add_test_requirements is defined %}
  15. {{ Requirements('set_property', current_target.add_test_requirements) }}
  16. {%- endif -%}
  17. {%- if current_target.add_ytest_requirements is defined %}
  18. {{ Requirements('set_yunittest_property', current_target.add_ytest_requirements) }}
  19. {%- endif -%}