-/* Copyright (c) 2010-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */
/* 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. */
/* We need an extra actor here, so that it can sleep until the end of each test */
static void main_dispatcher()
{
- run_test("sleep", test_sleep);
+ run_test("sleep", static_cast<std::function<void()>>(test_sleep));
run_test("sleep killed at start", test_sleep_kill_begin);
run_test("sleep killed in middle", test_sleep_kill_middle);
/* We cannot kill right at the end of the action because killer actors are always rescheduled to the end of the round
int main(int argc, char* argv[])
{
simgrid::s4u::Engine e(&argc, argv);
- xbt_assert(argc > 1);
- e.load_platform(argv[1]);
+
+ const char* platf = argv[1];
+ if (argc <= 1) {
+ XBT_WARN("No platform file provided. Using './testing_platform.xml'");
+ platf = "./testing_platform.xml";
+ }
+ e.load_platform(platf);
all_hosts = e.get_all_hosts();
simgrid::s4u::Actor::create("main_dispatcher", all_hosts[0], main_dispatcher);