fix tests, truncating log file breaks everything log
This commit is contained in:
parent
c5906899b4
commit
b693ddf953
|
@ -11,7 +11,8 @@ class Fingers::ActionRunner
|
||||||
|
|
||||||
return unless final_shell_command
|
return unless final_shell_command
|
||||||
|
|
||||||
`tmux run-shell -b "#{final_shell_command} &> #{Fingers::Dirs::LOG_PATH}"`
|
redirect_to_log_file = ">>#{Fingers::Dirs::LOG_PATH} 2>&1"
|
||||||
|
`tmux run-shell -b "#{final_shell_command} #{redirect_to_log_file}"`
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -80,11 +80,10 @@ class Fingers::Commands::LoadConfig < Fingers::Commands::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def setup_bindings
|
def setup_bindings
|
||||||
# ruby
|
|
||||||
input_mode = 'fingers-mode'
|
input_mode = 'fingers-mode'
|
||||||
ruby_bin = "#{RbConfig.ruby} --disable-gems"
|
ruby_bin = "#{RbConfig.ruby} --disable-gems"
|
||||||
|
|
||||||
`tmux bind-key #{Fingers.config.key} run-shell -b "#{ruby_bin} #{cli} start '#{input_mode}' '\#{pane_id}' >#{Fingers::Dirs::LOG_PATH} 2>&1"`
|
`tmux bind-key #{Fingers.config.key} run-shell -b "#{ruby_bin} #{cli} start '#{input_mode}' '\#{pane_id}' >>#{Fingers::Dirs::LOG_PATH} 2>&1"`
|
||||||
|
|
||||||
setup_fingers_mode_bindings if input_mode == 'fingers-mode'
|
setup_fingers_mode_bindings if input_mode == 'fingers-mode'
|
||||||
end
|
end
|
||||||
|
|
|
@ -113,6 +113,7 @@ class Fingers::Commands::Start < Fingers::Commands::Base
|
||||||
tmux.disable_prefix
|
tmux.disable_prefix
|
||||||
tmux.set_key_table 'fingers'
|
tmux.set_key_table 'fingers'
|
||||||
|
|
||||||
|
Fingers.benchmark_stamp('ready-for-input:end')
|
||||||
Fingers.trace_for_tests_do_not_remove_or_the_whole_fabric_of_reality_will_tear_apart_with_unforeseen_consequences('fingers-ready')
|
Fingers.trace_for_tests_do_not_remove_or_the_whole_fabric_of_reality_will_tear_apart_with_unforeseen_consequences('fingers-ready')
|
||||||
|
|
||||||
input_socket.on_input do |input|
|
input_socket.on_input do |input|
|
||||||
|
|
|
@ -56,9 +56,9 @@ module Fingers
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.load_from_cache
|
def self.load_from_cache
|
||||||
Fingers.benchmark_stamp('load_config_from_cache:start')
|
Fingers.benchmark_stamp('load-config-from-cache:start')
|
||||||
result = Marshal.load(File.open(CONFIG_PATH))
|
result = Marshal.load(File.open(CONFIG_PATH))
|
||||||
Fingers.benchmark_stamp('load_config_from_cache:end')
|
Fingers.benchmark_stamp('load-config-from-cache:end')
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -20,11 +20,6 @@ def measure_benchmarks
|
||||||
elsif phase == 'end'
|
elsif phase == 'end'
|
||||||
_, start_ms = step_stack.pop
|
_, start_ms = step_stack.pop
|
||||||
|
|
||||||
puts "step: #{step}"
|
|
||||||
puts "ms: #{ms}"
|
|
||||||
puts "start_ms: #{start_ms}"
|
|
||||||
puts '----'
|
|
||||||
|
|
||||||
ellapsed_ms = ms - start_ms
|
ellapsed_ms = ms - start_ms
|
||||||
|
|
||||||
ellapsed_times_by_step[step] = [] unless ellapsed_times_by_step[step]
|
ellapsed_times_by_step[step] = [] unless ellapsed_times_by_step[step]
|
||||||
|
|
|
@ -30,7 +30,7 @@ shared_context 'tmuxomatic setup', a: :b do
|
||||||
tmuxomatic.send_keys(tmuxomatic_pane_id, keys)
|
tmuxomatic.send_keys(tmuxomatic_pane_id, keys)
|
||||||
if trace_benchmark
|
if trace_benchmark
|
||||||
Fingers.benchmark_stamp('boot:start')
|
Fingers.benchmark_stamp('boot:start')
|
||||||
Fingers.benchmark_stamp('ready_for_input:start')
|
Fingers.benchmark_stamp('ready-for-input:start')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# TODO: detect when key is received, is it even possible?
|
# TODO: detect when key is received, is it even possible?
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
|
||||||
fingers_root = File.dirname(__FILE__)
|
fingers_root = File.dirname(__FILE__)
|
||||||
redirect_to_log_file = ">#{fingers_root}/fingers.log 2>&1"
|
|
||||||
|
|
||||||
`tmux run-shell -b "#{fingers_root}/bin/fingers load_config #{redirect_to_log_file}"`
|
redirect_to_log_file = ">>#{fingers_root}/fingers.log 2>&1"
|
||||||
|
|
||||||
|
`tmux run-shell -b "#{fingers_root}/bin/fingers load_config"`
|
||||||
`tmux run-shell -b "#{fingers_root}/bin/fingers check_version #{redirect_to_log_file}"`
|
`tmux run-shell -b "#{fingers_root}/bin/fingers check_version #{redirect_to_log_file}"`
|
||||||
|
|
Loading…
Reference in New Issue