2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-23 06:02:14 +00:00

Fixed Jamfile issues with tests

[SVN r14818]
This commit is contained in:
William E. Kempf
2002-08-13 19:19:09 +00:00
parent 43cbd3a283
commit 1e2a9e8971
9 changed files with 32 additions and 51 deletions

View File

@@ -36,28 +36,16 @@ include <module@>threads.jam ;
if $(NT) && ! $(PTW32)
{
dll boost_threadmon
: ../src/threadmon.cpp
: <sysinclude>$(BOOST_ROOT)
<threading>multi
: debug release <runtime-link>static/dynamic
;
dll boost_threadmon : <template>thread_base ../src/threadmon.cpp ;
}
#######################
# Declare the Boost.Threads static link library libboost_thread.
# Base names of the source files for libboost_thread.
CPP_SOURCES =
condition mutex recursive_mutex thread tss xtime once exceptions ;
CPP_SOURCES = condition mutex recursive_mutex thread tss xtime once exceptions ;
lib boost_thread
: ../src/$(CPP_SOURCES).cpp
: <sysinclude>$(BOOST_ROOT)
<threading>multi
$(pthreads-win32)
: debug release <runtime-link>static/dynamic
;
lib boost_thread : <template>thread_base ../src/$(CPP_SOURCES).cpp ;
#######################
# Stage the generated targets.

View File

@@ -21,3 +21,12 @@ if $(NT)
threadmon = <dll>../build/boost_threadmon ;
}
}
template thread_base
## sources ##
:
## requirements ##
: <sysinclude>$(BOOST_ROOT) <threading>multi $(pthreads-win32)
## default build ##
: debug release <runtime-link>static/dynamic
;

View File

@@ -28,16 +28,20 @@ include <module@>threads.jam ;
sources = test.cpp test_thread.cpp test_mutex.cpp test_condition.cpp test_tss.cpp test_once.cpp ;
template test_base
## sources ##
: <template>thread_base <lib>../build/boost_thread <lib>../../test/build/unit_test_framework $(threadmon)
## requirements ##
:
## default build ##
:
;
#######################
# Declare the Boost.Threads unit test program test_thread.
unit-test test_thread
: $(sources)
<lib>../build/boost_thread
<lib>../../test/build/unit_test_framework
$(threadmon)
: <sysinclude>$(BOOST_ROOT)
$(pthreads-win32)
<threading>multi
: debug release <runtime-link>static/dynamic
;
unit-test test_thread : <template>test_base test_thread.cpp ;
unit-test test_mutex : <template>test_base test_mutex.cpp ;
unit-test test_condition : <template>test_base test_condition.cpp ;
unit-test test_tss : <template>test_base test_tss.cpp ;
unit-test test_once : <template>test_base test_once.cpp ;

View File

@@ -1,20 +0,0 @@
#include <boost/test/unit_test.hpp>
extern boost::unit_test_framework::test_suite* thread_tests();
extern boost::unit_test_framework::test_suite* mutex_tests();
extern boost::unit_test_framework::test_suite* condition_tests();
extern boost::unit_test_framework::test_suite* tss_tests();
extern boost::unit_test_framework::test_suite* once_tests();
boost::unit_test_framework::test_suite* init_unit_test_suite(int argc, char* argv[])
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads test suite");
test->add(thread_tests());
test->add(mutex_tests());
test->add(condition_tests());
test->add(tss_tests());
test->add(once_tests());
return test;
}

View File

@@ -179,7 +179,7 @@ void test_condition_waits()
BOOST_CHECK_EQUAL(data.awoken, 4);
}
boost::unit_test_framework::test_suite* condition_tests()
boost::unit_test_framework::test_suite* init_unit_test_suite(int argc, char* argv[])
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads: condition test suite");

View File

@@ -155,7 +155,7 @@ struct test_recursive_lock
}
};
boost::unit_test_framework::test_suite* mutex_tests()
boost::unit_test_framework::test_suite* init_unit_test_suite(int argc, char* argv[])
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads: mutex test suite");

View File

@@ -29,11 +29,11 @@ void test_once()
BOOST_CHECK_EQUAL(once_value, 1);
}
boost::unit_test_framework::test_suite* once_tests()
boost::unit_test_framework::test_suite* init_unit_test_suite(int argc, char* argv[])
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads: once test suite");
test->add(BOOST_TEST_CASE(&test_once));
return test;
}
}

View File

@@ -77,7 +77,7 @@ void test_comparison()
thrd.join();
}
boost::unit_test_framework::test_suite* thread_tests()
boost::unit_test_framework::test_suite* init_unit_test_suite(int argc, char* argv[])
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads: thread test suite");

View File

@@ -49,7 +49,7 @@ void test_tss()
BOOST_CHECK_EQUAL(tss_instances, 0);
}
boost::unit_test_framework::test_suite* tss_tests()
boost::unit_test_framework::test_suite* init_unit_test_suite(int argc, char* argv[])
{
boost::unit_test_framework::test_suite* test = BOOST_TEST_SUITE("Boost.Threads: tss test suite");