class Autoproj::CLI::MainTest
Public Instance Methods
Source
# 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.validate_options([], options) 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
Source
# 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.validate_options(packages, options) cli.disable(*args) end end
Source
# 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.validate_options(packages, options) cli.enable(*args) end end
Source
# File lib/autoproj/cli/main_test.rb, line 95 def exec(*packages) require "autoproj/cli/test" options = self.options.merge(parent_options) report do |extra_options| cli = Test.new Autobuild.pass_test_errors = options.delete(:fail) Autobuild.ignore_errors = options.delete(:keep_going) Autobuild::TestUtility.coverage_enabled = options.delete(:coverage) options.delete(:tool) args = cli.validate_options(packages, options.merge(extra_options)) cli.run(*args) end end
Source
# File lib/autoproj/cli/main_test.rb, line 68 def list(*packages) require "autoproj/cli/test" report(silent: true) do cli = Test.new args = cli.validate_options(packages, options) cli.list(*args) end end
Source
# File lib/autoproj/cli/main_test.rb, line 9 def report(report_options = Hash.new) options = self.options.merge(parent_options) extra_options = Hash.new if options[:tool] Autobuild::Subprocess.transparent_mode = true Autobuild.silent = true Autobuild.color = false report_options[:silent] = true report_options[:on_package_failures] = :exit_silent extra_options[:silent] = true end Autoproj.report(**Hash[debug: options[:debug]].merge(report_options)) do yield(extra_options) end end