From 64fc15f48c604dad9e79e38c5058f0ed43545aaf Mon Sep 17 00:00:00 2001 From: Samuel Lepetit Date: Mon, 2 Jul 2012 18:17:56 +0200 Subject: [PATCH] Add lua-kademlia tesh file --- buildtools/Cmake/AddTests.cmake | 1 + examples/lua/kademlia/kademlia.tesh | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 examples/lua/kademlia/kademlia.tesh diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 55623d9710..1dbda4fa22 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -426,6 +426,7 @@ if(NOT enable_memcheck) ADD_TEST(lua-masterslave-bypass ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/console master_slave_bypass.tesh) ADD_TEST(lua-msg-masterslave-console ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/msg/masterslave --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave ${CMAKE_HOME_DIRECTORY}/examples/msg/masterslave/masterslave_console.tesh) ADD_TEST(lua-chord ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/chord chord.tesh) + ADD_TEST(lua-kademlia ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_HOME_DIRECTORY}/examples/lua/kademlia kademlia.tesh) ADD_TEST(simdag-test-lua ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cd ${CMAKE_BINARY_DIR}/examples/simdag --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/simdag ${CMAKE_HOME_DIRECTORY}/examples/simdag/test_simdag2_lua.tesh) set_tests_properties(lua-duplicated-globals PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so") set_tests_properties(lua-masterslave PROPERTIES ENVIRONMENT "LUA_CPATH=${CMAKE_BINARY_DIR}/examples/lua/?.so") diff --git a/examples/lua/kademlia/kademlia.tesh b/examples/lua/kademlia/kademlia.tesh new file mode 100644 index 0000000000..2092ee82fe --- /dev/null +++ b/examples/lua/kademlia/kademlia.tesh @@ -0,0 +1,27 @@ +$ lua kademlia.lua +> [Boivin:node:(2) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 1 ! +> [Jean_Yves:node:(3) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 11 ! +> [TeX:node:(4) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 111 ! +> [Geoff:node:(5) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 1111 ! +> [Disney:node:(6) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 11111 ! +> [iRMX:node:(7) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 111111 ! +> [McGee:node:(8) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 1111111 ! +> [Gatien:node:(9) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 11111111 ! +> [Laroche:node:(10) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 111111111 ! +> [Tanguay:node:(11) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 1111111111 ! +> [Morin:node:(12) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 11111111111 ! +> [Ethernet:node:(13) 0.000000] [lua/INFO] Hi, I'm going to join the network with the id 11111111111 ! +> [Morin:node:(12) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [Tanguay:node:(11) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [iRMX:node:(7) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [Gatien:node:(9) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [TeX:node:(4) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [Laroche:node:(10) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [Disney:node:(6) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [Geoff:node:(5) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [McGee:node:(8) 900.000000] [lua/INFO] 7/7 FIND_NODE have succedded +> [Jean_Yves:node:(3) 900.000000] [lua/INFO] 8/8 FIND_NODE have succedded +> [Jacquelin:node:(1) 900.000000] [lua/INFO] 0/8 FIND_NODE have succedded +> [Boivin:node:(2) 900.000000] [lua/INFO] 8/8 FIND_NODE have succedded +> [Ethernet:node:(13) 900.000000] [lua/INFO] 8/8 FIND_NODE have succedded + -- 2.20.1