Commit 94edd0d2 authored by Amadeu Andrade Barbosa Junior's avatar Amadeu Andrade Barbosa Junior
Browse files

Merge de incorporação das modificações no OpenBus SDK Lua 1.5.3 para o OpenBus SDK Lua 1.5.4



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/OB_SDK_LUA_v1_05_04_2012_07_31@143583 ae0415b3-e90b-0410-900d-d0be9363c56b
parents 8864530c b816fb5d
......@@ -41,7 +41,7 @@ end
-- Execuo
function main ()
-- Carga da IDL Hello
orb:loadidlfile("../idl/delegate.idl")
orb:loadidlfile("idl/delegate.idl")
-- Conexo com o barramento (tem de ser por certificado para o delegate) e obteno do componente HelloComponent
local entityName = props["entity.name"].value
......
......@@ -30,7 +30,7 @@ end
-- Execuo
function main ()
-- Carga da IDL Hello
orb:loadidlfile("../idl/delegate.idl")
orb:loadidlfile("idl/delegate.idl")
-- Permite que o ORB comece a aguardar requisies
openbus:run()
......
#!/bin/sh
#!/bin/ksh
${OPENBUS_HOME}/bin/lua5.1 client.lua $1
#!/bin/sh
#!/bin/ksh
${OPENBUS_HOME}/bin/lua5.1 server.lua
......@@ -27,7 +27,7 @@ local orb = openbus:getORB()
-- Execuo
function main ()
-- Carga da IDL Hello
orb:loadidlfile("../idl/hello.idl")
orb:loadidlfile("idl/hello.idl")
-- Conexo com o barramento e obteno do componente HelloComponent
local login = props.login.value
......
......@@ -34,7 +34,7 @@ end
-- Execuo
function main ()
-- Carga da IDL Hello
orb:loadidlfile("../idl/hello.idl")
orb:loadidlfile("idl/hello.idl")
-- Permite que o ORB comece a aguardar requisies
openbus:run()
......
SUNOS64_TECMAKE_FLAGS="USE_NODEPEND=Yes TEC_UNAME=SunOS510_64 BUILD_64=yes"
descriptors = {
{ name = "oil-source",
url = SVNREPURL.."/openbus/libs/trunk/oil-0.5.0",
url = SVNREPURL.."/openbus/libs/tags/OB_LIBS_v1_03_01_2011_12_12/oil-0.5.0",
directory = PRODAPP.."/oil-0.5.0",
},
{ name = "loop",
......@@ -17,7 +17,7 @@ descriptors = {
},
},
{ name = "lua5.1-source",
url = SVNREPURL.."/openbus/libs/trunk/lua5.1.3",
url = SVNREPURL.."/openbus/libs/tags/OB_LIBS_v1_03_01_2011_12_12/lua5.1.3",
directory = PRODAPP.."/lua5.1",
},
{ name = "lua5.1",
......@@ -48,41 +48,37 @@ descriptors = {
["../bin/${TEC_UNAME}/lua5.1"] = "bin",
},
},
{
name = "latt-1.0.0",
url = SVNREPURL .. "/luautils/latt/tags/v1_00_01_2011_07_12",
{ name = "latt",
url = SVNREPURL.."/luautils/latt/tags/v1_00_01_2011_07_12",
build = {
type = "tecmake",
src = PRODAPP .."/latt-1.0.0",
src = PRODAPP .."/latt",
mf = { },
},
dev_files = {
["lua/*"] = "lib/lua/5.1"
},
},
{ name = "openbus-api",
{ name = "openbus-lua",
build = {
type = "tecmake",
src = SVNDIR,
mf = { "config LUA51="..PRODAPP.."/lua5.1" },
Darwin = { mf = { "config LUA51="..PRODAPP.."/lua5.1","config LUA51="..PRODAPP.."/lua5.1 BUILD_DYLIB=YES" }, },
MacOS = { mf = { "config LUA51="..PRODAPP.."/lua5.1","config LUA51="..PRODAPP.."/lua5.1 BUILD_DYLIB=YES" }, },
SunOS510_64 = { mf = { "config LUA51="..PRODAPP.."/lua5.1 ".. SUNOS64_TECMAKE_FLAGS } },
},
install_files = {
["lib/${TEC_UNAME}/libluaopenbus.so"] = "lib",
["lib/${TEC_UNAME}/libluaopenbus.dylib"] = "lib",
["openbus"] = "lib/lua/5.1",
},
dev_files = {
["lib/${TEC_UNAME}/libluaopenbus.*"] = "lib",
["obj/${TEC_UNAME}/openbus.h"] = "include/openbus/lua/",
},
},
{ name = "openbus-demo-hello",
build = {
type = "tecmake",
src = SVNDIR .."/demo/hello",
mf = { },
},
{ name = "openbus-demo-hello-lua",
directory = SVNDIR .."/demo/hello",
dev_files = {
["client.lua"] = "demo/lua/hello",
["server.lua"] = "demo/lua/hello",
......@@ -92,12 +88,8 @@ descriptors = {
["management"] = "demo/lua/hello",
},
},
{ name = "openbus-demo-eventsink",
build = {
type = "tecmake",
src = SVNDIR .."/demo/eventSink",
mf = { },
},
{ name = "openbus-demo-eventsink-lua",
directory = SVNDIR .."/demo/eventSink",
dev_files = {
["client.lua"] = "demo/lua/eventSink",
["client.sh"] = "demo/lua/eventSink",
......@@ -107,12 +99,8 @@ descriptors = {
["management"] = "demo/lua/eventSink",
},
},
{ name = "openbus-demo-delegate",
build = {
type = "tecmake",
src = SVNDIR .."/demo/delegate",
mf = { },
},
{ name = "openbus-demo-delegate-lua",
directory = SVNDIR .."/demo/delegate",
dev_files = {
["client.lua"] = "demo/lua/delegate",
["server.lua"] = "demo/lua/delegate",
......
host.name = localhost
host.port = 2089
host.name = localhost
host.port = 2089
user = tester
password = tester
oil.verbose = 0
......
......@@ -241,60 +241,17 @@ Suite = {
Test3 = { -- Testa connectByCertificate
beforeTestCase = function(self)
local OPENBUS_HOME = os.getenv("OPENBUS_HOME")
local ltime = tostring(socket.gettime())
ltime = string.gsub(ltime, "%.", "")
self.systemId = "TesteBarramento".. ltime
self.systemId = "TesteBarramento"
self.deploymentId = self.systemId
self.testKeyFile = self.systemId .. ".key"
self.acsCertFile = "AccessControlService.crt"
local testACSCertFile = assert(io.open(self.acsCertFile,"r"))
testACSCertFile:close()
os.execute(OPENBUS_HOME.."/specs/shell/openssl-generate.ksh -n " .. self.systemId .. " -c "..OPENBUS_HOME.."/openssl/openssl.cnf <TesteBarramentoCertificado_input.txt 2> genkey-err.txt >genkeyT.txt ")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --add-system="..self.systemId ..
" --description=Teste_do_OpenBus" ..
" 2>> management-err.txt >>management.txt ")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --add-deployment="..self.deploymentId ..
" --system="..self.systemId ..
" --description=Teste_do_Barramento" ..
" --certificate="..self.systemId..".crt"..
" 2>> management-err.txt >>management.txt ")
Openbus:init(host, port, nil, iConfig)
end,
afterTestCase = function(self)
Openbus:destroy()
local OPENBUS_HOME = os.getenv("OPENBUS_HOME")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --del-deployment="..self.deploymentId..
" 2>> management-err.txt >>management.txt ")
os.execute(OPENBUS_HOME.."/bin/run_management.sh --acs-host=" .. host ..
" --acs-port=" .. port ..
" --login=tester" ..
" --password=tester" ..
" --del-system="..self.systemId..
" 2>> management-err.txt >>management.txt ")
--Apaga as chaves e certificados gerados
os.execute("rm -r " .. self.systemId .. ".key")
os.execute("rm -r " .. self.systemId .. ".crt")
end,
afterEachTest = function(self)
......
Category {
id = "OpenbusLegacyTest",
name = "Categoria para testes Legados",
}
Entity {
id = "TesteBarramento",
category = "OpenbusLegacyTest",
name = "Entidade de testes Legados",
}
Certificate {
id = "TesteBarramento",
certificate = "TesteBarramento.crt",
}
System {
id = "OpenbusLegacyTest",
description = "Categoria para testes Legados",
}
SystemDeployment {
id = "TesteBarramento",
system = "OpenbusLegacyTest",
description = "Entidade de testes Legados",
certificate = "TesteBarramento.crt",
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment