Skip to content

Commit

Permalink
Include test_port.lua in the test infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
jgvictores authored and drdanz committed May 18, 2018
1 parent c4fcc48 commit c330613
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
3 changes: 1 addition & 2 deletions bindings/lua/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
18 changes: 11 additions & 7 deletions bindings/lua/tests/test_port.lua
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()
2 changes: 1 addition & 1 deletion doc/release/v2_3_72_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ yarpserver is launched with `--ros` option. (#722)
removed), and enables the correct generation of `VOCAB`s inside `enum`s.
* Added `test_vocab.lua` to catch regressions on `VOCAB` in the future.
* Rename `test_string.lua` to more representative `test_port.lua`, enable it to
run without the `yarpserver`.
run without the `yarpserver`, and integrate it in the test infrastructure.

Contributors
------------
Expand Down

0 comments on commit c330613

Please sign in to comment.