1 # -*- python -*- 2 # 3 # Copyright (c) 2017 Stefan Seefeld 4 # All rights reserved. 5 # 6 # Distributed under the Boost Software License, Version 1.0. 7 # (See accompanying file LICENSE_1_0.txt or copy at 8 # http://www.boost.org/LICENSE_1_0.txt) 9 10 from faber import platform 11 from faber.feature import set 12 from faber.tools.compiler import define, libs 13 from faber.artefacts.binary import binary 14 from faber.test import test, report, fail 15 16 boost_suffix = options.get_with('boost-suffix') 17 boost_suffix = '-' + boost_suffix if boost_suffix else '' 18 boost_filesystem = 'boost_filesystem' + boost_suffix 19 boost_system = 'boost_system' + boost_suffix 20 21 test_features = set(libs(boost_filesystem, boost_system)) 22 23 def gil_test(name, sources, features): 24 return test(name, binary(name, sources, features=features)) 25 26 27 tests = [gil_test('image', 28 ['image.cpp', 'sample_image.cpp', 'error_if.cpp'], 29 features=test_features), 30 gil_test('channel', ['channel.cpp', 'error_if.cpp'], 31 features=test_features), 32 gil_test('pixel', ['pixel.cpp', 'error_if.cpp'], 33 features=test_features), 34 gil_test('pixel_iterator', ['pixel_iterator.cpp', 'error_if.cpp'], 35 features=test_features)] 36 37 38 default = report('report', tests, fail_on_failures=True) 39