Jamfile 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. # Boost regression-testing Jamfile
  2. # (C) Copyright David Abrahams 2001. Permission to copy, use, modify, sell and
  3. # distribute this software is granted provided this copyright notice appears in
  4. # all copies. This software is provided "as is" without express or implied
  5. # warranty, and with no claim as to its suitability for any purpose.
  6. subproject status ;
  7. # ----------- Jam rules for testing; test invocations at bottom ----------------#
  8. #######################################################################################
  9. # Tests generate a number of files reflecting their status in the subvariant-directory
  10. #
  11. # <test-name>.test - a marker so that Jam knows when it needs to be
  12. # rebuilt. It will contain the paths from this
  13. # directory to the source files used for the test
  14. #
  15. # <test-name>.success - present only if the test last succeeded.
  16. # Contains the string "succeeded"
  17. #
  18. # <test-name>.failure - present only if the test last failed. Contains the string
  19. # "failed".
  20. #
  21. # <test-name>.output - contains the output of the test if it was a run test.
  22. #######################################################################################
  23. # Declares a test target. If name is not supplied, it is taken from the name of
  24. # the first source file, sans extension and directory path.
  25. #
  26. # type should be a target type (e.g. OBJ, DLL, LIB, EXE)
  27. #
  28. # RETURNS the name(s) of the generated test target(s).
  29. rule boost-test ( sources + : target-type : requirements * : test-name ? )
  30. {
  31. local result ;
  32. {
  33. # manufacture a test name if none supplied explicitly
  34. test-name ?= $(sources[1]:D=:S=) ;
  35. # Make sure that targets don't become part of "all"
  36. local gSUPPRESS_FAKE_TARGETS = true ;
  37. local dependencies = [ select-gristed $(sources) ] ;
  38. local source-files = [ select-ungristed $(sources) ] ;
  39. result = [
  40. declare-local-target $(test-name)
  41. : $(source-files:R=$(BOOST_ROOT)) $(dependencies) # sources
  42. : $(requirements) <include>$(BOOST_ROOT) # requirements
  43. : # default build
  44. : $(target-type)
  45. ] ;
  46. }
  47. Clean clean : $(result) ;
  48. # make NOTFILE targets of the same base name as the sources which can
  49. # be used to build a single test.
  50. type-DEPENDS $(sources:B:S=) : $(result) ;
  51. # The NOTFILE target called "test" builds all tests
  52. type-DEPENDS test : $(result) ;
  53. return $(result) ;
  54. }
  55. #######
  56. BOOST_TEST_SUFFIX ?= .test ;
  57. # a utility rule which causes test-file to be built successfully only if
  58. # dependency fails to build. Used for expected-failure tests.
  59. rule failed-test-file ( test-file : dependency + )
  60. {
  61. catenate-output-on-failure $(test-file) : $(dependency[1]) ;
  62. DEPENDS $(test-file) : $(dependency) ;
  63. NOCARE $(dependency) ;
  64. TEMPORARY $(dependency) ;
  65. }
  66. # a utility rule which causes test-file to be built successfully only if
  67. # dependency builds. Used for expected-success tests.
  68. rule succeeded-test-file ( test-file : dependency + )
  69. {
  70. catenate-output-on-failure $(test-file) : $(dependency[1]) ;
  71. DEPENDS $(test-file) : $(dependency) ;
  72. NOCARE $(dependency) ;
  73. TEMPORARY $(dependency) ;
  74. }
  75. rule catenate-output-on-failure ( test-file : dependency )
  76. {
  77. if $(gTEST_OUTPUT_FILE($(dependency)))
  78. {
  79. output-file on $(test-file) = $(gTEST_OUTPUT_FILE($(dependency))) ;
  80. }
  81. }
  82. if $(NT)
  83. {
  84. CATENATE1 = "if exist \"" ;
  85. CATENATE2 = "\" ( type \"" ;
  86. CATENATE3 = "\"
  87. ECHO ****************************************************** )" ;
  88. actions failed-test-file bind output-file source-files
  89. {
  90. echo "$(source-files)" > $(<:S=.test)
  91. if EXIST "$(>)". (
  92. if EXIST "$(<:S=.success)". del /f/q "$(<:S=.success)".
  93. echo "failed" > "$(<:S=.failure)"
  94. echo *
  95. echo ***************** failed above test: $(<:B:S=) ********************
  96. $(CATENATE1)$(output-file)$(CATENATE2)$(output-file)$(CATENATE3)
  97. echo *
  98. ) ELSE (
  99. if EXIST "$(<:S=.failure)". del /f/q "$(<:S=.failure)".
  100. echo succeeded > "$(<:S=.success)"
  101. )
  102. }
  103. actions succeeded-test-file bind output-file source-files
  104. {
  105. echo "$(source-files)" > $(<:S=.test)
  106. if EXIST "$(>)". (
  107. if EXIST "$(<:S=.failure)". del /f/q "$(<:S=.failure)".
  108. echo succeeded > "$(<:S=.success)"
  109. ) ELSE (
  110. if EXIST "$(<:S=.success)". del /f/q "$(<:S=.success)".
  111. echo failed > "$(<:S=.failure)"
  112. echo *
  113. echo ***************** failed above test: $(<:B:S=) ********************
  114. $(CATENATE1)$(output-file)$(CATENATE2)$(output-file)$(CATENATE3)
  115. echo *
  116. )
  117. }
  118. }
  119. else
  120. {
  121. CATENATE = "cat " ;
  122. CATENATE1 = "if [ -f \"" ;
  123. CATENATE2 = "\" ] ; then
  124. cat \"" ;
  125. CATENATE3 = "\" ; echo ******************************************************
  126. fi" ;
  127. actions failed-test-file bind output-file source-files
  128. {
  129. echo "$(source-files)" > $(<:S=.test)
  130. if [ -f "$(>)" ] ; then
  131. if [ -f "$(<:S=.success)" ] ; then
  132. $(RM) "$(<:S=.success)"
  133. fi
  134. echo "failed" > $(<:S=.failure)
  135. echo "*"
  136. echo "***************** failed above test: $(<:B:S=) ********************"
  137. $(CATENATE1)$(output-file)$(CATENATE2)$(output-file)$(CATENATE3)
  138. echo "*"
  139. else
  140. if [ -f "$(<:S=.failure)" ] ; then
  141. $(RM) "$(<:S=.failure)"
  142. fi
  143. echo "succeeded" > "$(<:S=.success)"
  144. fi
  145. }
  146. actions succeeded-test-file bind output-file source-files
  147. {
  148. echo "$(source-files)" > "$(<:S=.test)"
  149. if [ -f "$(>)" ] ; then
  150. if [ -f "$(<:S=.failure)" ] ; then
  151. $(RM) "$(<:S=.failure)"
  152. fi
  153. echo "succeeded" > "$(<:S=.success)"
  154. else
  155. if [ -f "$(<:S=.success)" ] ; then
  156. $(RM) "$(<:S=.success)"
  157. fi
  158. echo "failed" > "$(<:S=.failure)"
  159. echo "*"
  160. echo "***************** failed above test: $(<:B:S=) ********************"
  161. $(CATENATE1)$(output-file)$(CATENATE2)$(output-file)$(CATENATE3)
  162. echo "*"
  163. fi
  164. }
  165. }
  166. rule declare-build-succeed-test ( test-type : dependency-type )
  167. {
  168. gGENERATOR_FUNCTION($(test-type)) = build-test succeeded-test-file ;
  169. gDEPENDENCY_TYPE($(test-type)) = $(dependency-type) ;
  170. SUF$(test-type) = $(BOOST_TEST_SUFFIX) ;
  171. }
  172. # A utility rule which declares test-type to be a target type which
  173. # depends on the /failed/ construction of a target of type
  174. # dependency-type.
  175. rule declare-build-fail-test ( test-type : dependency-type )
  176. {
  177. gGENERATOR_FUNCTION($(test-type)) = build-test failed-test-file ;
  178. gDEPENDENCY_TYPE($(test-type)) = $(dependency-type) ;
  179. SUF$(test-type) = $(BOOST_TEST_SUFFIX) ;
  180. }
  181. # A temporary measure in case people don't rebuild their Jam
  182. # executables. Define the builtin RMOLD if it's missing.
  183. if ! ( RMOLD in [ RULENAMES ] )
  184. {
  185. rule RMOLD { }
  186. }
  187. # When the appropriate generator function is bound to the
  188. # test-file-generator argument, this is a target generator function
  189. # for target types declared with declare-build-succeed-test and
  190. # declare-build-fail-test, above.
  191. rule build-test ( test-file-generator test-file + : sources + : requirements * )
  192. {
  193. # Get the target type of the current target out of the build properties
  194. local target-type = [ get-values <target-type> : $(gBUILD_PROPERTIES) ] ;
  195. # Get the type of target to attempt to build; the outcome of this
  196. # attempt determines the result of the test.
  197. local dependency-type = $(gDEPENDENCY_TYPE($(target-type))) ;
  198. # Get the actual name of the target to attempt to build
  199. local dependency = $(test-file[1]:S=$(SUF$(dependency-type))) ;
  200. # record the source file names so we can put them in the .test
  201. # file.
  202. source-files on $(test-file) = $(sources) ;
  203. # Make sure that the dependency is erased, so as not to give a
  204. # false indication of success.
  205. RMOLD $(dependency) ;
  206. # Call dependency-type's generator function to attempt the build
  207. local ignored = [
  208. $(gGENERATOR_FUNCTION($(dependency-type))) $(dependency) : $(sources) : $(requirements) ] ;
  209. # Generator functions don't handle this job for us; perhaps they should.
  210. set-target-variables $(dependency) ;
  211. # The .test file goes with the other subvariant targets
  212. MakeLocate $(test-file:S=.test) : $(LOCATE_TARGET) ;
  213. MakeLocate $(test-file:S=.success) : $(LOCATE_TARGET) ;
  214. MakeLocate $(test-file:S=.failure) : $(LOCATE_TARGET) ;
  215. # Generate the test file
  216. $(test-file-generator) $(test-file) : $(dependency) ;
  217. }
  218. ### Rules for testing whether a file compiles ###
  219. # Establish the rule which generates targets of type "OBJ". Should really go
  220. # into basic build system, but wasn't needed 'till now.
  221. gGENERATOR_FUNCTION(OBJ) = Object ;
  222. declare-build-fail-test COMPILE_FAIL : OBJ ;
  223. declare-build-succeed-test COMPILE : OBJ ;
  224. # Test that the given source-file(s) compile
  225. rule compile ( sources + : requirements * : test-name ? )
  226. {
  227. return [ boost-test $(sources) : COMPILE : $(requirements) : $(test-name) ] ;
  228. }
  229. # Test that the given source-file(s) fail to compile
  230. rule compile-fail ( sources + : requirements * : test-name ? )
  231. {
  232. return [ boost-test $(sources) : COMPILE_FAIL : $(requirements) : $(test-name) ] ;
  233. }
  234. ### Rules for testing whether a program runs ###
  235. gGENERATOR_FUNCTION(RUN_TEST) = run-test ;
  236. SUFRUN_TEST = .run ;
  237. rule run-test ( target : sources + : requirements * )
  238. {
  239. local executable = $(target:S=$(SUFEXE)) ;
  240. local parent = $(target:S=.test) ;
  241. # Move important data from the test target to the executable
  242. gRUN_LD_LIBRARY_PATH($(executable)) = $(gRUN_LD_LIBRARY_PATH($(parent))) ;
  243. gRUN_PATH($(executable)) = $(gRUN_PATH($(parent))) ;
  244. executable-file $(executable) : $(sources) : $(requirements) ;
  245. set-target-variables $(executable) ;
  246. # The .test file goes with the other subvariant targets
  247. # normalization is a hack to get the slashes going the right way on Windoze
  248. local LOCATE_TARGET = [ FDirName [ split-path $(LOCATE_TARGET) ] ] ;
  249. MakeLocate $(target) : $(LOCATE_TARGET) ;
  250. DEPENDS $(target) : $(executable) $(gRUN_TEST_INPUT_FILES) ;
  251. INPUT_FILES on $(target) = $(gRUN_TEST_INPUT_FILES) ;
  252. ARGS on $(target) = $(gRUN_TEST_ARGS) ;
  253. capture-run-output $(target) : $(executable) ;
  254. if $(RUN_ALL_TESTS)
  255. {
  256. ALWAYS $(target) ;
  257. }
  258. }
  259. # The rule is just used for argument checking
  260. rule capture-run-output ( target : executable + )
  261. {
  262. gTEST_OUTPUT_FILE($(target)) = $(target:S=.output) ;
  263. INCLUDES $(target) : $(target:S=.output) ;
  264. MakeLocate $(test-file:S=.failure) : $(LOCATE_TARGET) ;
  265. MakeLocate $(test-file:S=.output) : $(LOCATE_TARGET) ;
  266. capture-run-output1 $(target) : $(executable) ;
  267. }
  268. rule capture-run-output1 ( target : executable )
  269. {
  270. output-file on $(target) = $(target:S=.output) ;
  271. local targets = $(target) $(target:S=.output) ;
  272. RUN_PATH on $(targets) = [ join $(gRUN_PATH($(executable))) : $(SPLITPATH) ] ;
  273. if $(UNIX)
  274. {
  275. RUN_LD_LIBRARY_PATH on $(targets) = [ join $(gRUN_LD_LIBRARY_PATH($(executable))) : $(SPLITPATH) ] ;
  276. }
  277. }
  278. if $(UNIX)
  279. {
  280. actions capture-run-output1 bind INPUT_FILES output-file
  281. {
  282. $(SHELL_SET)PATH=$(RUN_PATH):$PATH
  283. $(SHELL_EXPORT)PATH
  284. $(SHELL_SET)LD_LIBRARY_PATH=$(RUN_LD_LIBRARY_PATH):$LD_LIBRARY_PATH
  285. $(SHELL_EXPORT)LD_LIBRARY_PATH
  286. $(>) $(ARGS) $(INPUT_FILES) > $(output-file) 2>&1 && $(CP) $(output-file) $(<[1])
  287. }
  288. }
  289. else
  290. {
  291. actions capture-run-output1 bind INPUT_FILES output-file
  292. {
  293. $(SHELL_SET)PATH=$(RUN_PATH);%PATH%
  294. $(SHELL_EXPORT)PATH
  295. $(>) $(ARGS) $(INPUT_FILES) > $(output-file) 2>&1 && $(CP) $(output-file) $(<[1])
  296. }
  297. }
  298. declare-build-fail-test RUN_FAIL : RUN_TEST ;
  299. declare-build-succeed-test RUN : RUN_TEST ;
  300. rule run ( sources + : args * : input-files * : requirements * : name ? )
  301. {
  302. local gRUN_TEST_ARGS = $(args) ;
  303. local gRUN_TEST_INPUT_FILES = $(input-files) ;
  304. SEARCH on $(input-files) = $(LOCATE_SOURCE) ;
  305. return [ boost-test $(sources) : RUN : $(requirements) : $(name) ] ;
  306. }
  307. rule run-fail ( sources + : args * : input-files * : requirements * : name ? )
  308. {
  309. local gRUN_TEST_ARGS = $(2) ;
  310. local gRUN_TEST_INPUT_FILES = $(3) ;
  311. SEARCH on $(3) = $(LOCATE_SOURCE) ;
  312. return [ boost-test $(<) : RUN_FAIL : $(4) : $(name) ] ;
  313. }
  314. ### Rules for testing whether a program links
  315. declare-build-fail-test LINK_FAIL : EXE ;
  316. rule link-fail ( sources + : requirements * : name ? )
  317. {
  318. return [ boost-test $(<) : LINK_FAIL : $(2) : $(name) ] ;
  319. }
  320. ### Rules for grouping tests into suites:
  321. rule test-suite # pseudotarget-name : test-targets...
  322. {
  323. NOTFILE $(<) ;
  324. type-DEPENDS $(<) : $(>) ;
  325. }
  326. # ------------- Actual test invocations follow -----------------#
  327. # Note that the Compiler Status Report HTML generator scans
  328. # these rule invocations to find test type. That program is
  329. # pretty stupid and needs help, including test names (if supplied)
  330. # which are unambiguous, not the same as a .cpp file name, and
  331. # preceded and followed by a space.
  332. test-suite "bind"
  333. : [ run libs/bind/bind_test.cpp ]
  334. [ run libs/bind/bind_test.cpp ]
  335. [ run libs/bind/mem_fn_test.cpp ]
  336. [ run libs/bind/mem_fn_void_test.cpp ]
  337. ;
  338. test-suite config
  339. : [ run libs/config/test/config_test.cpp
  340. : #args
  341. : #input-files
  342. : #requirements
  343. <threading>multi
  344. ]
  345. [ run libs/config/test/config_info.cpp ]
  346. [ run libs/config/test/limits_test.cpp ]
  347. ;
  348. run libs/any/any_test.cpp ;
  349. run libs/array/array1.cpp ;
  350. test-suite concept_check
  351. : [ compile libs/concept_check/concept_check_test.cpp ]
  352. [ compile libs/concept_check/class_concept_check_test.cpp ]
  353. [ link-fail libs/concept_check/concept_check_fail_expected.cpp ]
  354. [ link-fail libs/concept_check/class_concept_fail_expected.cpp ]
  355. ;
  356. test-suite conversion
  357. : [ run libs/conversion/cast_test.cpp ]
  358. [ run libs/conversion/lexical_cast_test.cpp ]
  359. ;
  360. run libs/crc/crc_test.cpp ;
  361. run libs/function/test/function_test.cpp ;
  362. run libs/functional/function_test.cpp ;
  363. run libs/graph/test/graph.cpp ;
  364. test-suite integer
  365. : [ run libs/integer/cstdint_test.cpp ]
  366. [ run libs/integer/integer_test.cpp ]
  367. [ run libs/integer/integer_traits_test.cpp ]
  368. ;
  369. run libs/io/test/ios_state_test.cpp ;
  370. test-suite lambda
  371. : [ run libs/lambda/test/bind_tests_simple.cpp ]
  372. [ run libs/lambda/test/bind_tests_advanced.cpp ]
  373. [ run libs/lambda/test/bind_tests_simple_f_refs.cpp ]
  374. [ run libs/lambda/test/bll_and_function.cpp ]
  375. [ run libs/lambda/test/cast_test.cpp ]
  376. [ run libs/lambda/test/constructor_tests.cpp ]
  377. [ run libs/lambda/test/control_structures.cpp ]
  378. [ run libs/lambda/test/exception_test.cpp ]
  379. [ run libs/lambda/test/extending_rt_traits.cpp ]
  380. [ run libs/lambda/test/is_instance_of_test.cpp ]
  381. [ run libs/lambda/test/member_pointer_test.cpp ]
  382. [ run libs/lambda/test/operator_tests_simple.cpp ]
  383. [ run libs/lambda/test/phoenix_control_structures.cpp ]
  384. [ run libs/lambda/test/switch_construct.cpp ]
  385. ;
  386. test-suite math
  387. : [ run libs/math/test/common_factor_test.cpp ]
  388. [ run libs/math/octonion/octonion_test.cpp ]
  389. [ run libs/math/quaternion/quaternion_test.cpp ]
  390. [ run libs/math/special_functions/special_functions_test.cpp ]
  391. ;
  392. run libs/pool/test/test_pool_alloc.cpp ;
  393. test-suite rational
  394. : [ run libs/rational/rational_example.cpp ]
  395. [ run libs/rational/rational_test.cpp ]
  396. ;
  397. test-suite random
  398. : [ run libs/random/random_test.cpp ]
  399. [ run libs/random/random_demo.cpp ]
  400. ;
  401. run libs/utility/ref_test.cpp ;
  402. {
  403. local test-dir = $(BOOST_ROOT)$(SLASH)libs$(SLASH)regex$(SLASH)test$(SLASH)regress$(SLASH) ;
  404. local test-files = $(test-dir)tests.txt
  405. # dwa -- not sure if this is generally applicable
  406. # $(test-dir)test1252.txt
  407. ;
  408. test-suite regex
  409. : [ run libs/regex/test/regress/parse.cpp libs/regex/test/regress/regress.cpp libs/regex/test/regress/tests.cpp
  410. <lib>../libs/regex/build/boost_regex$(SUFLIB)
  411. :
  412. $(test-files)
  413. :
  414. :
  415. <define>BOOST_REGEX_NO_LIB=1
  416. <define>BOOST_REGEX_STATIC_LINK=1
  417. :
  418. regress ]
  419. [ run libs/regex/test/regress/parse.cpp libs/regex/test/regress/regress.cpp libs/regex/test/regress/tests.cpp
  420. <lib>../libs/regex/build/boost_regex$(SUFLIB)
  421. :
  422. $(test-files)
  423. :
  424. :
  425. <define>BOOST_REGEX_NO_LIB=1
  426. <define>TEST_UNICODE=1
  427. <define>BOOST_REGEX_STATIC_LINK=1
  428. :
  429. wregress ]
  430. [ run libs/regex/test/c_compiler_checks/posix_api_check.c
  431. <lib>../libs/regex/build/boost_regex$(SUFLIB)
  432. :
  433. :
  434. :
  435. <define>BOOST_REGEX_NO_LIB=1
  436. <define>BOOST_REGEX_STATIC_LINK=1
  437. :
  438. posix_api_check_c ]
  439. [ run libs/regex/test/c_compiler_checks/wide_posix_api_check.c
  440. <lib>../libs/regex/build/boost_regex$(SUFLIB)
  441. :
  442. :
  443. :
  444. <define>BOOST_REGEX_NO_LIB=1
  445. <define>BOOST_REGEX_STATIC_LINK=1
  446. :
  447. wide_posix_api_check_c ]
  448. [ run libs/regex/test/c_compiler_checks/posix_api_check.cpp
  449. <lib>../libs/regex/build/boost_regex$(SUFLIB)
  450. :
  451. :
  452. :
  453. <define>BOOST_REGEX_NO_LIB=1
  454. <define>BOOST_REGEX_STATIC_LINK=1
  455. ]
  456. [ run libs/regex/test/c_compiler_checks/wide_posix_api_check.cpp
  457. <lib>../libs/regex/build/boost_regex$(SUFLIB)
  458. :
  459. :
  460. :
  461. <define>BOOST_REGEX_NO_LIB=1
  462. <define>BOOST_REGEX_STATIC_LINK=1
  463. ]
  464. ;
  465. }
  466. run libs/smart_ptr/smart_ptr_test.cpp ;
  467. test-suite static_assert
  468. : [ compile libs/static_assert/static_assert_test.cpp ]
  469. [ compile-fail libs/static_assert/static_assert_test_fail_1.cpp ]
  470. [ compile-fail libs/static_assert/static_assert_test_fail_2.cpp ]
  471. [ compile-fail libs/static_assert/static_assert_test_fail_3.cpp ]
  472. [ compile-fail libs/static_assert/static_assert_test_fail_4.cpp ]
  473. [ compile-fail libs/static_assert/static_assert_test_fail_5.cpp ]
  474. [ compile-fail libs/static_assert/static_assert_test_fail_6.cpp ]
  475. [ compile-fail libs/static_assert/static_assert_test_fail_7.cpp ]
  476. [ link-fail libs/static_assert/static_assert_test_fail_8.cpp ]
  477. ;
  478. run libs/test/example/test_tools_example.cpp ;
  479. run-fail libs/test/test/test_tools_fail2.cpp ;
  480. {
  481. local threadmon ;
  482. if $(NT)
  483. {
  484. threadmon = <dll>../libs/thread/build/boost_threadmon ;
  485. }
  486. test-suite threads
  487. : [
  488. run libs/thread/test/test_thread.cpp
  489. <lib>../libs/thread/build/boost_thread
  490. $(threadmon)
  491. : #args
  492. : #input-files
  493. : #requirements
  494. <threading>multi
  495. ]
  496. ;
  497. }
  498. compile libs/timer/timer_test.cpp ;
  499. test-suite tokenizer
  500. : [ run libs/tokenizer/examples.cpp ]
  501. [ run libs/tokenizer/simple_example_1.cpp ]
  502. [ run libs/tokenizer/simple_example_2.cpp ]
  503. [ run libs/tokenizer/simple_example_3.cpp ]
  504. [ run libs/tokenizer/simple_example_4.cpp ]
  505. [ run libs/tokenizer/simple_example_5.cpp ]
  506. ;
  507. test-suite type_traits
  508. : [ run libs/type_traits/tests/alignment_test.cpp ]
  509. [ run libs/type_traits/tests/arithmetic_traits_test.cpp ]
  510. [ run libs/type_traits/tests/composite_traits_test.cpp ]
  511. [ run libs/type_traits/tests/cv_traits_test.cpp ]
  512. [ run libs/type_traits/tests/is_function_test.cpp ]
  513. [ run libs/type_traits/tests/is_convertible_test.cpp ]
  514. [ run libs/type_traits/tests/is_same_test.cpp ]
  515. [ run libs/type_traits/tests/object_type_traits_test.cpp ]
  516. [ run libs/type_traits/tests/transform_traits_test.cpp ]
  517. ;
  518. run libs/utility/call_traits_test.cpp : -u ;
  519. compile-fail libs/utility/checked_delete_test.cpp ;
  520. run libs/utility/compressed_pair_test.cpp : -u ;
  521. test-suite iterator_adaptors
  522. : [ run libs/utility/counting_iterator_test.cpp : # args
  523. : # input files
  524. : # requirements
  525. # borland warns incorrectly in this case, so often that
  526. # successful compilation is prevented.
  527. <borland><*><cxxflags>"-w-8091 -w-8092"
  528. ]
  529. [ run libs/utility/iterator_adaptor_test.cpp ]
  530. [ compile-fail libs/utility/iter_adaptor_fail_expected1.cpp ]
  531. [ compile-fail libs/utility/iter_adaptor_fail_expected2.cpp ]
  532. [ run libs/utility/transform_iterator_test.cpp ]
  533. [ run libs/utility/indirect_iterator_test.cpp ]
  534. [ run libs/utility/iter_traits_gen_test.cpp ]
  535. [ run libs/utility/iterator_adaptor_examples.cpp ]
  536. [ run libs/utility/counting_iterator_example.cpp ]
  537. [ run libs/utility/filter_iterator_example.cpp ]
  538. [ run libs/utility/fun_out_iter_example.cpp ]
  539. [ run libs/utility/indirect_iterator_example.cpp ]
  540. [ run libs/utility/projection_iterator_example.cpp ]
  541. [ run libs/utility/reverse_iterator_example.cpp ]
  542. [ run libs/utility/transform_iterator_example.cpp ]
  543. ;
  544. run libs/utility/iterator_traits_test.cpp ;
  545. run libs/utility/iterators_test.cpp ;
  546. compile-fail libs/utility/noncopyable_test.cpp ;
  547. run libs/utility/numeric_traits_test.cpp ;
  548. run libs/utility/operators_test.cpp ;
  549. run libs/utility/tie_example.cpp ;
  550. run libs/utility/binary_search_test.cpp ;
粤ICP备19079148号