subproject libs/test/test ;

# bring in the rules for testing
SEARCH on testing.jam = $(BOOST_BUILD_PATH) ;
include testing.jam ;

local test-dir = $(BOOST_ROOT)$(SLASH)libs$(SLASH)test$(SLASH)test$(SLASH) ;

rule test-btl-lib ( test-rule : test-name : lib-name ? : pattern_file ? )
{
   return [ $(test-rule) $(test-name).cpp <lib>../build/$(lib-name)
            : #args
            : $(pattern_file)
            : <stlport-iostream>on <borland><*><cxxflags>-w-8080 # requirements
          ] ;
}

test-suite "prg_exec_monitor_test"
        : [ test-btl-lib run-fail : prg_exec_fail1 : boost_prg_exec_monitor ]
          [ test-btl-lib run-fail : prg_exec_fail2 : boost_prg_exec_monitor ]
          [ test-btl-lib run-fail : prg_exec_fail3 : boost_prg_exec_monitor ]
        ;

test-suite "test_exec_monitor_test"
        : [ test-btl-lib run-fail : test_exec_fail1 : boost_test_exec_monitor ]
          [ test-btl-lib run-fail : test_exec_fail2 : boost_test_exec_monitor ]
          [ test-btl-lib run-fail : test_exec_fail3 : boost_test_exec_monitor ]
          [ test-btl-lib run-fail : test_exec_fail4 : boost_test_exec_monitor ]
        ;

test-suite "unit_test_framework_test"
        : [ test-btl-lib run : errors_handling_test : boost_test_exec_monitor : $(test-dir)errors_handling_test.pattern ]
          [ test-btl-lib run : online_test ]
          [ test-btl-lib run-fail : minimal_test ]
          [ test-btl-lib run : output_test_stream_test : boost_unit_test_framework ]
          [ test-btl-lib run : result_report_test      : boost_test_exec_monitor : $(test-dir)result_report_test.pattern ]
          [ test-btl-lib run : parameterized_test_test : boost_test_exec_monitor ]
          [ test-btl-lib run : test_fp_comparisons     : boost_unit_test_framework ]
          [ test-btl-lib run : test_tools_test         : boost_unit_test_framework ]
          [ test-btl-lib run : auto_unit_test_test     : boost_unit_test_framework ]
          [ test-btl-lib run : unit_test_suite_ex_test : boost_unit_test_framework ]
        ;
