From 92d4a29a5d0bea7c237e3704ede8117f41cebda1 Mon Sep 17 00:00:00 2001 From: Klemens Morgenstern Date: Thu, 19 Oct 2023 11:29:40 +0800 Subject: [PATCH] fixed jamfile for boost.test. --- .drone.star | 13 ++++++++++--- test/Jamfile.jam | 4 ++-- test/thread.cpp | 7 ++++--- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.drone.star b/.drone.star index f8458de5..386062ff 100644 --- a/.drone.star +++ b/.drone.star @@ -8,6 +8,7 @@ deps = [ 'libs/array', 'libs/align', + 'libs/algorithm', 'libs/asio', 'libs/assert', 'libs/beast', @@ -19,25 +20,31 @@ deps = [ 'libs/container', 'libs/core', 'libs/date_time', + 'libs/detail', + 'libs/exception', + 'libs/function', 'libs/headers', 'libs/integer', 'libs/intrusive', + 'libs/io', + 'libs/iterator', 'libs/leaf', 'libs/mpl', 'libs/move', 'libs/mp11', 'libs/numeric', + 'libs/optional', 'libs/predef', 'libs/preprocessor', 'libs/ratio', - 'libs/system', - 'libs/static_assert', 'libs/smart_ptr', + 'libs/static_assert', + 'libs/system', 'libs/test', 'libs/thread', 'libs/throw_exception', - 'libs/utility', 'libs/type_traits', + 'libs/utility', 'libs/variant2', 'libs/winapi', 'tools/build', diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 1dfd4b2e..0e4372cc 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -25,9 +25,9 @@ lib test_impl : test_main.cpp /boost//cobalt : ; run main.cpp /boost//cobalt ; -run main_compile.cpp /boost//cobalt ; +run main_compile.cpp /boost//cobalt util.cpp concepts.cpp ; -for local src in [ glob *.cpp : main.cpp main_compile.cpp ] +for local src in [ glob *.cpp : main.cpp main_compile.cpp test_main.cpp concepts.cpp ] { run $(src) test_impl ; } diff --git a/test/thread.cpp b/test/thread.cpp index eafd0620..d22ea515 100644 --- a/test/thread.cpp +++ b/test/thread.cpp @@ -77,13 +77,14 @@ CO_TEST_CASE(spawn_onto_thread) auto t = thr(); auto id = co_await cobalt::spawn(t.get_executor(), on_thread(), cobalt::use_op); - auto id2 = t.get_id(); - auto id3 = std::this_thread::get_id(); + BOOST_CHECK(id == id2); BOOST_CHECK(id3 != id); - t.join(); + + if (t.joinable()) + t.join(); }