Skip to content

Commit

Permalink
refactor: fix lua check
Browse files Browse the repository at this point in the history
  • Loading branch information
edubart committed Oct 16, 2024
1 parent 8a19b68 commit c971972
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
7 changes: 3 additions & 4 deletions tests/lua/cartesi-machine-tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ local periodic_action = false
local periodic_action_period = math.maxinteger
local periodic_action_start = 0
local concurrency_update_merkle_tree = util.parse_number(os.getenv("CARTESI_CONCURRENCY_UPDATE_MERKLE_TREE")) or 0
local cleanup = {}

-- List of supported options
-- Options are processed in order
Expand Down Expand Up @@ -604,10 +603,10 @@ local function run_machine_with_uarch(machine, ctx, max_mcycle)
end

local function connect()
local remote = protocol.connect(remote_address) -- server will be shutdown when remote is collected
local stub = protocol.connect(remote_address) -- server will be shutdown when remote is collected
local version =
assert(remote.get_server_version(), "could not connect to remote cartesi machine at " .. remote_address)
return remote, version
assert(stub.get_server_version(), "could not connect to remote cartesi machine at " .. remote_address)
return stub, version
end

local function build_machine(ram_image)
Expand Down
1 change: 0 additions & 1 deletion tests/lua/cmio-test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ end
local MACHINES_DIR = adjust_images_path(test_util.cmio_path)

local remote_address
local cleanup = {}

-- Print help and exit
local function help()
Expand Down
3 changes: 1 addition & 2 deletions tests/lua/machine-bind.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ local test_util = require("cartesi.tests.util")

local remote_address
local test_path = "./"
local cleanup = {}
local concurrency_update_merkle_tree = util.parse_number(os.getenv("CARTESI_CONCURRENCY_UPDATE_MERKLE_TREE")) or 0

local lua_cmd = arg[-1] .. " -e "
-- local lua_cmd = arg[-1] .. " -e "

-- There is no UINT64_MAX in Lua, so we have to use the signed representation
local MAX_MCYCLE = -1
Expand Down
1 change: 0 additions & 1 deletion tests/lua/machine-test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ local MAX_MCYCLE = -1

local remote_address
local test_path = "/tmp/"
local cleanup = {}

-- Print help and exit
local function help()
Expand Down

0 comments on commit c971972

Please sign in to comment.