-static void main_dispatcher()
-{
- XBT_INFO("***** Using <tester_test> *****");
- run_test("exec: run and test once", test_trivial<create_exec, tester_test>);
- run_test("exec: run and test many", test_basic<create_exec, tester_test>);
- run_test("exec: cancel and test", test_cancel<create_exec, tester_test>);
- FAILING run_test("exec: actor failure and test / sleep", test_failure_actor<create_exec, tester_test, waiter_sleep6>);
- FAILING run_test("exec: host failure and test / sleep", test_failure_host<create_exec, tester_test, waiter_sleep6>);
- run_test("exec: actor failure and test / wait", test_failure_actor<create_exec, tester_test, waiter_wait>);
- run_test("exec: host failure and test / wait", test_failure_host<create_exec, tester_test, waiter_wait>);
-
- XBT_INFO("***** Using <tester_wait<0>> *****");
- run_test("exec: run and wait<0> once", test_trivial<create_exec, tester_wait<0>>);
- FAILING run_test("exec: run and wait<0> many", test_basic<create_exec, tester_wait<0>>);
- run_test("exec: cancel and wait<0>", test_cancel<create_exec, tester_wait<0>>);
- FAILING run_test("exec: actor failure and wait<0> / sleep", test_failure_actor<create_exec, tester_wait<0>, waiter_sleep6>);
- FAILING run_test("exec: host failure and wait<0> / sleep", test_failure_host<create_exec, tester_wait<0>, waiter_sleep6>);
- FAILING run_test("exec: actor failure and wait<0> / wait", test_failure_actor<create_exec, tester_wait<0>, waiter_wait>);
- FAILING run_test("exec: host failure and wait<0> / wait", test_failure_host<create_exec, tester_wait<0>, waiter_wait>);
-
- XBT_INFO("***** Using <tester_wait<1>> *****");
- run_test("exec: run and wait<1> once", test_trivial<create_exec, tester_wait<1>>);
- FAILING run_test("exec: run and wait<1> many", test_basic<create_exec, tester_wait<1>>);
- run_test("exec: cancel and wait<1>", test_cancel<create_exec, tester_wait<1>>);
- FAILING run_test("exec: actor failure and wait<1> / sleep", test_failure_actor<create_exec, tester_wait<1>, waiter_sleep6>);
- FAILING run_test("exec: host failure and wait<1> / sleep", test_failure_host<create_exec, tester_wait<1>, waiter_sleep6>);
- FAILING run_test("exec: actor failure and wait<1> / wait", test_failure_actor<create_exec, tester_wait<1>, waiter_wait>);
- FAILING run_test("exec: host failure and wait<1> / wait", test_failure_host<create_exec, tester_wait<1>, waiter_wait>);
+#define RUN_SECTION(descr, ...) SECTION(descr) { simgrid::s4u::Actor::create(descr, all_hosts[0], __VA_ARGS__); }
+
+TEST_CASE("Activity test/wait: using <tester_test>")
+{
+ XBT_INFO("#####[ launch next test ]#####");
+
+ RUN_SECTION("exec: run and test once", test_trivial<create_exec, tester_test>);
+ RUN_SECTION("exec: run and test many", test_basic<create_exec, tester_test>);
+ RUN_SECTION("exec: cancel and test", test_cancel<create_exec, tester_test>);
+ FAILING{} RUN_SECTION("exec: actor failure and test / sleep", test_failure_actor<create_exec, tester_test, waiter_sleep6>);
+ FAILING RUN_SECTION("exec: host failure and test / sleep", test_failure_host<create_exec, tester_test, waiter_sleep6>);
+ RUN_SECTION("exec: actor failure and test / wait", test_failure_actor<create_exec, tester_test, waiter_wait>);
+ RUN_SECTION("exec: host failure and test / wait", test_failure_host<create_exec, tester_test, waiter_wait>);
+
+ simgrid::s4u::this_actor::sleep_for(10);
+ assert_cleanup();
+}
+
+TEST_CASE("Activity test/wait: using <tester_wait<0>>")
+{
+ XBT_INFO("#####[ launch next test ]#####");
+
+ RUN_SECTION("exec: run and wait<0> once", test_trivial<create_exec, tester_wait<0>>);
+ FAILING RUN_SECTION("exec: run and wait<0> many", test_basic<create_exec, tester_wait<0>>);
+ RUN_SECTION("exec: cancel and wait<0>", test_cancel<create_exec, tester_wait<0>>);
+ FAILING RUN_SECTION("exec: actor failure and wait<0> / sleep", test_failure_actor<create_exec, tester_wait<0>, waiter_sleep6>);
+ FAILING RUN_SECTION("exec: host failure and wait<0> / sleep", test_failure_host<create_exec, tester_wait<0>, waiter_sleep6>);
+ FAILING RUN_SECTION("exec: actor failure and wait<0> / wait", test_failure_actor<create_exec, tester_wait<0>, waiter_wait>);
+ FAILING RUN_SECTION("exec: host failure and wait<0> / wait", test_failure_host<create_exec, tester_wait<0>, waiter_wait>);
+
+ simgrid::s4u::this_actor::sleep_for(10);
+ assert_cleanup();
+}
+
+TEST_CASE("Activity test/wait: using <tester_wait<1>>")
+{
+ XBT_INFO("#####[ launch next test ]#####");
+
+ RUN_SECTION("exec: run and wait<1> once", test_trivial<create_exec, tester_wait<1>>);
+ FAILING RUN_SECTION("exec: run and wait<1> many", test_basic<create_exec, tester_wait<1>>);
+ RUN_SECTION("exec: cancel and wait<1>", test_cancel<create_exec, tester_wait<1>>);
+ FAILING RUN_SECTION("exec: actor failure and wait<1> / sleep", test_failure_actor<create_exec, tester_wait<1>, waiter_sleep6>);
+ FAILING RUN_SECTION("exec: host failure and wait<1> / sleep", test_failure_host<create_exec, tester_wait<1>, waiter_sleep6>);
+ FAILING RUN_SECTION("exec: actor failure and wait<1> / wait", test_failure_actor<create_exec, tester_wait<1>, waiter_wait>);
+ FAILING RUN_SECTION("exec: host failure and wait<1> / wait", test_failure_host<create_exec, tester_wait<1>, waiter_wait>);
+
+ simgrid::s4u::this_actor::sleep_for(10);
+ assert_cleanup();