From 38249857c3a72a5c5d0dcd36b53a74e7bf381eda Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 13 Sep 2017 16:08:39 +0200 Subject: [PATCH] Get rid of spurious symlink for lua test. --- teshsuite/lua/lua_platforms.tesh | 4 ++-- tools/cmake/MakeLib.cmake | 7 ------- tools/cmake/Tests.cmake | 6 +++--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/teshsuite/lua/lua_platforms.tesh b/teshsuite/lua/lua_platforms.tesh index 17e7aecdb0..1ca79927ff 100644 --- a/teshsuite/lua/lua_platforms.tesh +++ b/teshsuite/lua/lua_platforms.tesh @@ -1,4 +1,4 @@ -$ ${bindir:=.}/../../examples/msg/app-masterworker/app-masterworker ${srcdir:=.}/../../examples/platforms/small_platform.lua ${srcdir:=.}/../../examples/msg/app-masterworker/app-masterworker_d.xml +$ ${bindir:=.}/msg/app-masterworker/app-masterworker ${srcdir:=.}/../../examples/platforms/small_platform.lua ${srcdir:=.}/../../examples/msg/app-masterworker/app-masterworker_d.xml > [Tremblay:master:(1) 0.000000] [msg_app_masterworker/INFO] Got 5 workers and 20 tasks to process > [Tremblay:master:(1) 0.000000] [msg_app_masterworker/INFO] Sending "Task_0" (of 20) to mailbox "worker-0" > [Tremblay:master:(1) 0.002265] [msg_app_masterworker/INFO] Sending "Task_1" (of 20) to mailbox "worker-1" @@ -28,7 +28,7 @@ $ ${bindir:=.}/../../examples/msg/app-masterworker/app-masterworker ${srcdir:=.} > [Bourassa:worker:(6) 5.133855] [msg_app_masterworker/INFO] I'm done. See you! > [5.133855] [msg_app_masterworker/INFO] Simulation time 5.13386 -$ $SG_TEST_EXENV ${bindir:=.}/../../examples/msg/app-token-ring/app-token-ring ${srcdir:=.}/../../examples/platforms/routing_cluster.lua "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" +$ $SG_TEST_EXENV ${bindir:=.}/msg/app-token-ring/app-token-ring ${srcdir:=.}/../../examples/platforms/routing_cluster.lua "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" > [ 0.000000] (0:maestro@) Number of hosts '6' > [ 0.000000] (1:0@host1) Host "0" send 'Token' to Host "1" > [ 0.017354] (2:1@host2) Host "1" received "Token" diff --git a/tools/cmake/MakeLib.cmake b/tools/cmake/MakeLib.cmake index 2ac7862f12..6aed72c998 100644 --- a/tools/cmake/MakeLib.cmake +++ b/tools/cmake/MakeLib.cmake @@ -44,13 +44,6 @@ endif() if(SIMGRID_HAVE_LUA) ADD_CUSTOM_TARGET(link_simgrid_lua ALL DEPENDS simgrid - ${CMAKE_BINARY_DIR}/examples/lua/simgrid.${LIB_EXE} - ) - add_custom_command( - OUTPUT ${CMAKE_BINARY_DIR}/examples/lua/simgrid.${LIB_EXE} - COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/examples/lua/simgrid.${LIB_EXE} # if it exists, creating the link fails. So cleanup before hand - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/examples/lua/ - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_BINARY_DIR}/lib/libsimgrid.${LIB_EXE} ${CMAKE_BINARY_DIR}/examples/lua/simgrid.${LIB_EXE} #for test ) SET(SIMGRID_DEP "${SIMGRID_DEP} ${LUA_LIBRARY} ${DL_LIBRARY}") endif() diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index a6aea406a0..8d4d570a37 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -82,8 +82,8 @@ ENDIF() IF(SIMGRID_HAVE_LUA) # Tests testing simulation from C but using lua for platform files. Executed like this # ~$ ./masterslave platform.lua deploy.lua - ADD_TESH(lua-platform-masterslave --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/lua --cd ${CMAKE_BINARY_DIR}/examples/lua ${CMAKE_HOME_DIRECTORY}/teshsuite/lua/lua_platforms.tesh) - SET_TESTS_PROPERTIES(lua-platform-masterslave PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so") + ADD_TESH(lua-platform-masterslave --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/lua --cd ${CMAKE_BINARY_DIR}/examples ${CMAKE_HOME_DIRECTORY}/teshsuite/lua/lua_platforms.tesh) + SET_TESTS_PROPERTIES(lua-platform-masterslave PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/lib/lib?.${LIB_EXE}") ENDIF() ADD_TEST(testall ${CMAKE_BINARY_DIR}/testall) @@ -98,4 +98,4 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND) else() set(EXTRA_DIST ${EXTRA_DIST} src/surf/trace_mgr_test.cpp) -endif() \ No newline at end of file +endif() -- 2.20.1