From 8d489eb2bc48607d6572e9283e33827959499f20 Mon Sep 17 00:00:00 2001 From: Dan Bode Date: Tue, 4 Dec 2012 16:34:30 -0800 Subject: [PATCH] Add checkout and test task it goes through the entire process of checking out a pull request, testing it, and posting the results. --- Rakefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Rakefile b/Rakefile index 3d6ca29..fa545ae 100644 --- a/Rakefile +++ b/Rakefile @@ -112,6 +112,37 @@ end namespace :test do + desc 'checkout and test a pull request, publish the results' + task 'pull_request', [:project_name, :number] do |t, args| + require 'vagrant' + require 'github_api' + $stdout.reopen("my.log", "w") + $stdout.sync = true + $stderr.reopen($stdout) + refresh_modules + checkout_pr( + args.project_name, + args.number, + [github_login], + 'test_it', + { + :login => github_login, + :password => github_password + } + ) + test_two_node(['redhat', 'ubuntu']) + results = File.read('my.log') + publish_results( + args.project_name, + args.number, + results, + { + :login => github_login, + :password => github_password + } + ) + end + desc 'test openstack with basic test script on redhat and ubuntu' task 'two_node' do test_two_node(['redhat', 'ubunut'])