Class: ManageIQ::CrossRepo::Runner
- Inherits:
-
Object
- Object
- ManageIQ::CrossRepo::Runner
- Defined in:
- lib/manageiq/cross_repo/runner.rb,
lib/manageiq/cross_repo/runner/base.rb,
lib/manageiq/cross_repo/runner/github.rb,
lib/manageiq/cross_repo/runner/travis.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#core_repo ⇒ Object
readonly
Returns the value of attribute core_repo.
-
#gem_repos ⇒ Object
readonly
Returns the value of attribute gem_repos.
-
#script_cmd ⇒ Object
readonly
Returns the value of attribute script_cmd.
-
#test_repo ⇒ Object
readonly
Returns the value of attribute test_repo.
-
#test_suite ⇒ Object
readonly
Returns the value of attribute test_suite.
Instance Method Summary collapse
-
#initialize(test_repo:, repos:, test_suite: nil, script_cmd: nil) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(test_repo:, repos:, test_suite: nil, script_cmd: nil) ⇒ Runner
Returns a new instance of Runner.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/manageiq/cross_repo/runner.rb', line 10 def initialize(test_repo:, repos:, test_suite: nil, script_cmd: nil) @test_repo = Repository.new(test_repo || "ManageIQ/manageiq@master") core_repos, @gem_repos = Array(repos).collect { |repo| Repository.new(repo) }.partition(&:core?) @core_repo = core_repos.first if @test_repo.core? raise ArgumentError, "You cannot pass a different core repo when running a core test" if @core_repo.present? && @core_repo != @test_repo @core_repo = @test_repo else @core_repo ||= Repository.new("ManageIQ/manageiq@master") end @script_cmd = script_cmd.presence @test_suite = test_suite.presence end |
Instance Attribute Details
#core_repo ⇒ Object (readonly)
Returns the value of attribute core_repo.
8 9 10 |
# File 'lib/manageiq/cross_repo/runner.rb', line 8 def core_repo @core_repo end |
#gem_repos ⇒ Object (readonly)
Returns the value of attribute gem_repos.
8 9 10 |
# File 'lib/manageiq/cross_repo/runner.rb', line 8 def gem_repos @gem_repos end |
#script_cmd ⇒ Object (readonly)
Returns the value of attribute script_cmd.
8 9 10 |
# File 'lib/manageiq/cross_repo/runner.rb', line 8 def script_cmd @script_cmd end |
#test_repo ⇒ Object (readonly)
Returns the value of attribute test_repo.
8 9 10 |
# File 'lib/manageiq/cross_repo/runner.rb', line 8 def test_repo @test_repo end |
#test_suite ⇒ Object (readonly)
Returns the value of attribute test_suite.
8 9 10 |
# File 'lib/manageiq/cross_repo/runner.rb', line 8 def test_suite @test_suite end |
Instance Method Details
#run ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/manageiq/cross_repo/runner.rb', line 28 def run announce_run test_repo.ensure_clone core_repo.ensure_clone unless test_repo.core? prepare_gem_repos run_tests end |