Skip to content

Commit

Permalink
Merge pull request #1252 from johnduarte/add-beaker-hosts
Browse files Browse the repository at this point in the history
(maint) Acceptance Rake - give CONFIG priority
  • Loading branch information
joshcooper committed Jan 11, 2016
2 parents 6c1ccad + 243b21e commit 6738577
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions acceptance/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ EOS
tests_opt = "--tests=#{tests}" if tests

target = ENV['TEST_TARGET']
if target
if config and File.exists(config)
config_opt = "--hosts=#{config}"
elsif target
cli = BeakerHostGenerator::CLI.new([target, '--disable-default-role', '--osinfo-version', '1'])
ENV['CONFIG'] = "tmp/#{target}-#{SecureRandom.uuid}.yaml"
ENV['BEAKER_HOSTS'] = "tmp/#{target}-#{SecureRandom.uuid}.yaml"
FileUtils.mkdir_p('tmp')
File.open(config, 'w') do |fh|
fh.print(cli.execute)
end
config_opt = "--hosts=#{config}"
elsif config
config_opt = "--hosts=#{config}"
end

overriding_options = ENV['OPTIONS']
Expand Down Expand Up @@ -243,7 +243,7 @@ def sha
end

def config
ENV['CONFIG']
ENV['BEAKER_HOSTS']
end

namespace :ci do
Expand All @@ -256,7 +256,7 @@ namespace :ci do

USAGE = <<-EOS
Requires commit SHA to be put under test as environment variable: SHA='<sha>'.
Also must set CONFIG=config/nodes/foo.yaml or include it in an options.rb for Beaker,
Also must set BEAKER_HOSTS=config/nodes/foo.yaml or include it in an options.rb for Beaker,
or specify TEST_TARGET in a form beaker-hostgenerator accepts, e.g. ubuntu1504-64a.
You may set TESTS=path/to/test,and/more/tests.
You may set additional Beaker OPTIONS='--more --options'
Expand Down

0 comments on commit 6738577

Please sign in to comment.