Skip to content

Commit

Permalink
fix newest test, rename a function and correct a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JL-Brothers committed Sep 3, 2024
1 parent 0a6fd7d commit 562433c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
# list of script filenames on server contains a target folder name
./openc3.sh cliroot script list | grep -q "INST2"
# spawning a script in a subfolder returns 0 and prints only a PID
./openc3.sh cliroot script spawn INST/procedures/checks.rb | grep -q "^\s*\d+\s*$"
./openc3.sh cliroot script spawn INST/procedures/checks.rb | grep -qv "^\s*\d+\s*$"
# running a known good script with a wait value returns 0 and prints a success message
./openc3.sh cliroot script run --wait 10 INST/procedures/checks.rb | grep -q "script complete"
- name: openc3.sh util save,load
Expand Down
8 changes: 4 additions & 4 deletions openc3/bin/openc3cli
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def run_bridge(filename, params)
end
end

def script_monitor(script_id)
def cli_script_monitor(script_id)
ret_code = ERROR_CODE
require 'openc3/script'
OpenC3::RunningScriptWebSocketApi.new(id: script_id) do |api|
Expand Down Expand Up @@ -744,12 +744,12 @@ def cli_script_run(disconnect=false, environment={}, args=[])
id = script_run(args[0], disconnect: disconnect, environment: environment, scope: scope) # could raise
$script_interrupt_text = " Script #{args[0]} still running remotely.\n" # for Ctrl-C
if (wait_limit < 1) then
ret_code = script_monitor(id)
ret_code = cli_script_monitor(id)
else
Timeout::timeout(wait_limit, nil, "--wait #{wait_limit} exceeded") do
ret_code = script_monitor(id)
ret_code = cli_script_monitor(id)
rescue Timeout::ExitException, Timeout::Error => tmoexcp
# Timeout exceptions are also thrown by the Websocket API, so we check
# Timeout exceptions are also raised by the Websocket API, so we check
if tmoexcp.message =~ /^--wait /
puts tmoexcp.message + ", detaching from running script #{args[0]}"
else
Expand Down

0 comments on commit 562433c

Please sign in to comment.