utest.parts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # pylint:disable=I0011,W0401,W0614,C0103,E0602
  2. ############################################################################
  3. # Copyright 2017 Intel Corporation
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. ############################################################################
  17. """Build configuration for unit test of tiny math library.
  18. """
  19. Import('*')
  20. env.PartName('utest')
  21. env.DependsOn([Component('gtest'),
  22. Component(env.subst('${PART_PARENT_NAME}'))])
  23. utest_files = Pattern(src_dir='.',
  24. includes=['*-test.cc',
  25. '*-testhelper.cc'],
  26. recursive=True).files()
  27. env.Append(CPPPATH='#')
  28. env['UNIT_TEST_TARGET_NAME'] = "${PART_PARENT_NAME}-${UNIT_TEST_TARGET}"
  29. utest = env.UnitTest('${PART_SHORT_NAME}',
  30. utest_files,
  31. command_args=[
  32. '--gtest_filter=**',
  33. '--gtest_color=yes',
  34. '--gtest_print_time=1',
  35. '--gtest_output=xml',
  36. #'--gtest_break_on_failure',
  37. #'--gtest_catch_exceptions=0',
  38. ],
  39. data_src=[],
  40. make_pdb=(env.isConfigBasedOn('debug')),
  41. INSTALL_BIN='${INSTALL_TEST_BIN}',
  42. )