include examples/smpi/trace_call_location/trace_call_location.tesh
include examples/smpi/trace_simple/trace_simple.c
include examples/smpi/trace_simple/trace_simple.tesh
+include src/include/catch_simgrid.hpp
include teshsuite/java/semaphoregc/SemaphoreGC.java
include teshsuite/java/semaphoregc/semaphoregc.tesh
include teshsuite/java/sleephostoff/SleepHostOff.java
include teshsuite/python/corrupt-stack/corrupt-stack_d.xml
include teshsuite/python/platform-mix/platform-mix.py
include teshsuite/python/platform-mix/platform-mix.tesh
-include teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp
-include teshsuite/s4u/activity-lifecycle/activity-lifecycle.hpp
+include teshsuite/s4u/../catch_simgrid.cpp
include teshsuite/s4u/activity-lifecycle/activity-lifecycle.tesh
include teshsuite/s4u/activity-lifecycle/testing_comm.cpp
include teshsuite/s4u/activity-lifecycle/testing_comm_direct.cpp
extern void assert_cleanup();
/* We need an extra actor here, so that it can sleep until the end of each test */
-#define BEGIN_SECTION(descr) SECTION(descr) { simgrid::s4u::Actor::create(descr, all_hosts[0], []()
-#define END_SECTION })
+#define BEGIN_SECTION(descr) \
+ SECTION(descr) \
+ { simgrid::s4u::Actor::create(descr, all_hosts[0], []()
+#define END_SECTION \
+ })
#define RUN_SECTION(descr, ...) SECTION(descr) simgrid::s4u::Actor::create(descr, all_hosts[0], __VA_ARGS__)
#define CATCH_CONFIG_RUNNER // we supply our own main()
-#include "activity-lifecycle.hpp"
+#include "catch_simgrid.hpp"
#include <xbt/config.hpp>
e.load_platform(platf);
int status = 42;
- all_hosts = e.get_all_hosts();
+ all_hosts = e.get_all_hosts();
simgrid::s4u::Actor::create("main_dispatcher", all_hosts[0],
[&argc, &argv, &status]() { status = Catch::Session().run(argc, argv); });
+# Specify the source files of multi-files tests
+set(activity-lifecycle_sources ../catch_simgrid.cpp)
+foreach(x sleep exec comm comm_direct test-wait)
+ set(activity-lifecycle_sources ${activity-lifecycle_sources} activity-lifecycle/testing_${x}.cpp)
+endforeach()
+
foreach(x actor actor-autorestart actor-suspend
activity-lifecycle
comm-get-sender comm-pt2pt wait-all-for wait-any-for
trace-integration
seal-platform
vm-live-migration vm-suicide issue71)
- add_executable (${x} EXCLUDE_FROM_ALL ${x}/${x}.cpp)
+
+ if(NOT DEFINED ${x}_sources)
+ set(${x}_sources ${x}/${x}.cpp)
+ endif()
+
+ add_executable (${x} EXCLUDE_FROM_ALL ${${x}_sources})
target_link_libraries(${x} simgrid)
set_target_properties(${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
add_dependencies(tests ${x})
- set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.cpp)
-endforeach()
+ foreach(file ${${x}_sources})
+ set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${file})
+ endforeach()
-# Fix build rules for activity-lifecycle (multi-file)
-foreach(x sleep exec comm comm_direct test-wait)
- target_sources(activity-lifecycle PRIVATE activity-lifecycle/testing_${x}.cpp)
- set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/testing_${x}.cpp)
+ unset(${x}_sources)
endforeach()
-set_property(TARGET activity-lifecycle APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}") # for <catch.hpp>
+set_property(TARGET activity-lifecycle APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}") # for <catch.hpp> and catch_simgrid
+
## Add the tests.
## Some need to be run with all factories, some don't need tesh to run
ADD_TEST(tesh-parser-full-links02 ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/teshsuite/platforms/two_clusters_one_name.xml FULL_LINK)
ADD_TEST(tesh-parser-one-link-g5k ${CMAKE_BINARY_DIR}/teshsuite/s4u/basic-parsing-test/basic-parsing-test ${CMAKE_HOME_DIRECTORY}/examples/platforms/g5k.xml ONE_LINK)
-set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/activity-lifecycle.hpp PARENT_SCOPE)
+set(teshsuite_src ${teshsuite_src} ${CMAKE_SOURCE_DIR}/src/include/catch_simgrid.hpp PARENT_SCOPE)
set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-sym-full.tesh
${CMAKE_CURRENT_SOURCE_DIR}/basic-parsing-test/basic-parsing-test-bypass.tesh PARENT_SCOPE)
set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/activity-lifecycle/testing_platform.xml
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "activity-lifecycle.hpp"
+#include "catch_simgrid.hpp"
#include <array>
static void test_link_off_helper(double delay)
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "activity-lifecycle.hpp"
+#include "catch_simgrid.hpp"
TEST_CASE("Activity lifecycle: direct communication activities")
{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "activity-lifecycle.hpp"
+#include "catch_simgrid.hpp"
TEST_CASE("Activity lifecycle: exec activities")
{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "activity-lifecycle.hpp"
+#include "catch_simgrid.hpp"
TEST_CASE("Activity lifecycle: sleep activities")
{
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "activity-lifecycle.hpp"
+#include "catch_simgrid.hpp"
//========== Creators: create an async activity