Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lib/grntest/executors/base-executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ def execute_directive_copy_path(line, content, options)
end
end

def execute_directive_list_files(line, content, options)
raw_path = options.first
if raw_path.nil?
log_input(line)
log_error("#|e| [file-exist] path is missing")
end
path = Pathname(expand_variables(raw_path))
Comment on lines +199 to +203
path.parent.glob('**/*').each do |entry|
log_output("#{entry.basename}")
end
end

def timeout_value(key, line, input, default)
new_value = nil

Expand Down Expand Up @@ -628,6 +640,8 @@ def execute_directive(parser, line, content)
execute_directive_include(line, content, options)
when "copy-path"
execute_directive_copy_path(line, content, options)
when "list-files"
execute_directive_list_files(line, content, options)
when "timeout"
execute_directive_timeout(line, content, options)
when "read-timeout"
Expand Down