1# Boost Filesystem Library test Jamfile 2 3# (C) Copyright Beman Dawes 2002-2006 4# (C) Copyright Andrey Semashev 2020 5# Distributed under the Boost Software License, Version 1.0. 6# See www.boost.org/LICENSE_1_0.txt 7 8import testing ; 9import os ; 10 11# The rule checks we're running on Windows that supports mklink command (Vista and later) 12rule check-mklink ( properties * ) 13{ 14 local result ; 15 16 if <target-os>windows in $(properties) 17 { 18 # mklink is a builtin shell command, so we can't check if an executable exists. 19 # Testing the exit status of the mklink command (in the hope that it will be different 20 # when the command is not supported) is inconclusive as for some reason Windows 8.1 shell 21 # always returns exit code of 1. We have to match the output of the command. :( 22 # Note that the output may be localized, so pick some part that is likely to be stable regardless 23 # of localization. 24 local output = [ SHELL "mklink /?" : exit-status ] ; 25 if [ MATCH (MKLINK) : $(output[1]) ] 26 { 27 result = <define>BOOST_FILESYSTEM_HAS_MKLINK ; 28 } 29 } 30 31 #ECHO Result: $(result) ; 32 return $(result) ; 33} 34 35project 36 : requirements 37 <library>/boost/filesystem//boost_filesystem 38 <conditional>@check-mklink 39 ; 40 41# Some tests are run both statically and as shared libraries since Filesystem 42# has a history of bugs that appear only in one type of build or the other. 43 44path-constant HERE : . ; 45 46local VIS ; 47 48if [ os.environ UBSAN ] 49{ 50 VIS = <visibility>global 51 -<library>/boost/filesystem//boost_filesystem 52 <library>/boost/filesystem//boost_filesystem/<visibility>global ; 53} 54 55run config_info.cpp : : : <link>shared <test-info>always_show_run_output ; 56run config_info.cpp : : : <link>static <test-info>always_show_run_output : config_info_static ; 57run convenience_test.cpp ; 58compile macro_default_test.cpp ; 59run odr1_test.cpp odr2_test.cpp ; 60run deprecated_test.cpp ; 61run fstream_test.cpp : : : $(VIS) ; 62run large_file_support_test.cpp ; 63run locale_info.cpp : : : <test-info>always_show_run_output ; 64run operations_test.cpp : : : <link>shared <test-info>always_show_run_output ; 65run operations_test.cpp : : : <link>static : operations_test_static ; 66run operations_unit_test.cpp : $(HERE) : : <link>shared <test-info>always_show_run_output ; 67run copy_test.cpp ; 68run path_test.cpp : : : <link>shared ; 69run path_test.cpp : : : <link>static : path_test_static ; 70run path_unit_test.cpp : : : <link>shared $(VIS) ; 71run path_unit_test.cpp : : : <link>static $(VIS) : path_unit_test_static ; 72run relative_test.cpp ; 73run ../example/simple_ls.cpp ; 74run ../example/file_status.cpp ; 75run foreach_test.cpp ; 76 77# `quick` target (for CI) 78run quick.cpp ; 79 80# Tests for specific issues 81run issues/70-71-copy.cpp ; 82 83run issues/99_canonical_with_junction_point.cpp ; 84run issues/reparse_tag_file_placeholder.cpp ; 85