-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Permit autoproj to perform configuration noninteractively by relying …
…on the default values
- Loading branch information
Showing
7 changed files
with
201 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
require 'autoproj/test' | ||
require 'autoproj/cli/main' | ||
require 'autoproj/cli/reconfigure' | ||
require 'timeout' | ||
|
||
module Autoproj | ||
module CLI | ||
describe Reconfigure do | ||
attr_reader :ws | ||
before do | ||
option_name = "custom-configuration-option" | ||
default_value = "option-defaultvalue" | ||
|
||
@ws = ws_create(make_tmpdir, partial_config: true) | ||
end | ||
after do | ||
Autoproj.verbose = false | ||
end | ||
describe "#reconfigure" do | ||
def run_command(*args) | ||
capture_subprocess_io do | ||
ENV['AUTOPROJ_CURRENT_ROOT'] = ws.root_path.to_s | ||
in_ws do | ||
Main.start([*args,"--debug"], debug: true) | ||
end | ||
end | ||
end | ||
|
||
it "reconfigure should run interactively" do | ||
assert_raises Timeout::Error do | ||
Timeout.timeout(3) do | ||
run_command 'reconfigure' | ||
end | ||
end | ||
end | ||
it "reconfigure should run non interactively" do | ||
run_command 'reconfigure','--no-interactive' | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters