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""" 19Import('*') 20env.PartName('utest') 21 22env.DependsOn([Component('gtest'), 23 Component(env.subst('${PART_PARENT_NAME}'))]) 24 25utest_files = Pattern(src_dir='.', 26 includes=['*-test.cc', 27 '*-testhelper.cc'], 28 recursive=True).files() 29 30env.Append(CPPPATH='#') 31 32env['UNIT_TEST_TARGET_NAME'] = "${PART_PARENT_NAME}-${UNIT_TEST_TARGET}" 33 34utest = env.UnitTest('${PART_SHORT_NAME}', 35 utest_files, 36 command_args=[ 37 '--gtest_filter=**', 38 '--gtest_color=yes', 39 '--gtest_print_time=1', 40 '--gtest_output=xml', 41 #'--gtest_break_on_failure', 42 #'--gtest_catch_exceptions=0', 43 ], 44 data_src=[], 45 make_pdb=(env.isConfigBasedOn('debug')), 46 INSTALL_BIN='${INSTALL_TEST_BIN}', 47 ) 48