Class: Autoproj::CLI::MainTest
- Inherits:
-
Thor
- Object
- Thor
- Autoproj::CLI::MainTest
- Defined in:
- lib/autoproj/cli/main_test.rb
Instance Method Summary collapse
- #default(on_or_off) ⇒ Object
- #disable(*packages) ⇒ Object
- #enable(*packages) ⇒ Object
- #exec(*packages) ⇒ Object
- #list(*packages) ⇒ Object
Instance Method Details
#default(on_or_off) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/autoproj/cli/main_test.rb', line 27 def default(on_or_off) require "autoproj/cli/test" report(silent: true) do cli = Test.new args = cli.([], ) enabled = case on_or_off when "on" then true when "off" then false else raise ArgumentError, "expected 'on' or 'off'" end cli.default(enabled) end end |
#disable(*packages) ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/autoproj/cli/main_test.rb', line 56 def disable(*packages) require "autoproj/cli/test" report(silent: true) do cli = Test.new args = cli.(packages, ) cli.disable(*args) end end |
#enable(*packages) ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/autoproj/cli/main_test.rb', line 44 def enable(*packages) require "autoproj/cli/test" report(silent: true) do cli = Test.new args = cli.(packages, ) cli.enable(*args) end end |
#exec(*packages) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/autoproj/cli/main_test.rb', line 95 def exec(*packages) require "autoproj/cli/test" = self..merge() report do || cli = Test.new Autobuild.pass_test_errors = .delete(:fail) Autobuild.ignore_errors = .delete(:keep_going) Autobuild::TestUtility.coverage_enabled = .delete(:coverage) .delete(:tool) args = cli.(packages, .merge()) cli.run(*args) end end |