Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .evergreen/Dockerfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ ENV MONGO_ORCHESTRATION_HOME=/tmpfs \
PROJECT_DIRECTORY=/app \
<%= @env.map { |k, v| %Q`#{k}="#{v.gsub('$', "\\$").gsub('"', "\\\"")}"` }.join(" \\\n ") %>

<% if interactive? %>
ENV INTERACTIVE=1
<% end %>

COPY . .

<% if expose? %>
Expand Down
8 changes: 8 additions & 0 deletions .evergreen/test-on-docker
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ class Runner
opts.on('-s', '--script=SCRIPT', 'Test script to invoke') do |v|
@options[:script] = v
end

opts.on('-i', '--interactive', 'Interactive mode - disable per-test timeouts') do |v|
@options[:interactive] = v
end
end.parse!

@env = Hash[ARGV.map do |arg|
Expand Down Expand Up @@ -185,6 +189,10 @@ class Runner
!!@options[:preload]
end

def interactive?
!!@options[:interactive]
end

def server_download_url
@server_download_url ||= ServerVersionRegistry.new(server_version, distro).download_url
end
Expand Down
2 changes: 1 addition & 1 deletion spec/lite_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
end
end

if SpecConfig.instance.ci?
if SpecConfig.instance.ci? && !%w(1 true yes).include?(ENV['INTERACTIVE']&.downcase)
# Allow a max of 30 seconds per test.
# Tests should take under 10 seconds ideally but it seems
# we have some that run for more than 10 seconds in CI.
Expand Down