forked from robotology/yarp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include test_port.lua in the test infrastructure
- Loading branch information
1 parent
c4fcc48
commit c330613
Showing
3 changed files
with
13 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ | |
# Authors: Silvio Traversaro <[email protected]> | ||
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT | ||
|
||
# test_string.lua uses the yarpserver, so for now it is not include in the CTest infrastructure | ||
|
||
macro(add_lua_unit_test luascript) | ||
# Find the lua interpreter (ideally, this should be handled in FindLua or in a separate | ||
# FindLuaInterp like for python) | ||
|
@@ -27,3 +25,4 @@ endmacro() | |
add_lua_unit_test(test_bottle_and_property.lua) | ||
add_lua_unit_test(test_resource_finder.lua) | ||
add_lua_unit_test(test_vocab.lua) | ||
add_lua_unit_test(test_port.lua) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
#!/usr/bin/lua | ||
|
||
-- Copyright: (C) 2013 Istituto Italiano di Tecnologia (IIT) | ||
-- Author: Paul Fitzpatrick | ||
-- Author: Paul Fitzpatrick, Juan G Victores | ||
-- Copy Policy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT | ||
|
||
-- set LUA_CPATH to include yarp.so/yarp.dll | ||
require("yarp") | ||
yarp.Network() | ||
yarp.Network.setLocalMode(true) | ||
port = yarp.BufferedPortBottle() | ||
port:open("/lua/test") | ||
port:close() | ||
|
||
function test_port() | ||
yarp.Network() | ||
yarp.Network.setLocalMode(true) | ||
port = yarp.BufferedPortBottle() | ||
port:open("/lua/test") | ||
port:close() | ||
end | ||
|
||
test_port() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters