diff --git a/Rakefile b/Rakefile index 0eff9d7..0717d3c 100644 --- a/Rakefile +++ b/Rakefile @@ -10,3 +10,18 @@ task :default do Process.waitpid(pid) end end + +task :scenario do + root_path = File.expand_path "../.", __FILE__ + Dir["#{root_path}/tests/scenario/*_comment_test.sh"].each do |test| + name = File.basename(test) + puts "Running scenario #{name}..." + Dir.mktmpdir("gvm-test") do |tmpdir| + install = `binscripts/gvm-installer binary_default #{tmpdir}` + pid = fork do + exec("bash -c 'source #{tmpdir}/gvm/scripts/gvm; tf --text #{tmpdir}/gvm/tests/scenario/#{name}'") + end + Process.waitpid(pid) + end + end +end diff --git a/tests/scenario/gvm_install_1.2.2_binary_comment_test.sh b/tests/scenario/gvm_install_1.2.2_binary_comment_test.sh new file mode 100644 index 0000000..efe4f68 --- /dev/null +++ b/tests/scenario/gvm_install_1.2.2_binary_comment_test.sh @@ -0,0 +1 @@ +gvm install go1.2.2 --binary #status=0 diff --git a/tests/scenario/gvm_install_1.2.2_comment_test.sh b/tests/scenario/gvm_install_1.2.2_comment_test.sh new file mode 100644 index 0000000..49b2fb7 --- /dev/null +++ b/tests/scenario/gvm_install_1.2.2_comment_test.sh @@ -0,0 +1 @@ +gvm install go1.2.2 #status=0