From a3e3de4735b9aa403099a08b34e696983c38c214 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 19 Jun 2014 15:11:55 +1000 Subject: [PATCH] Allow to pass commit hash to tester --- lib/tasks/docker.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index 2109a9a51f8..f3431e303af 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -8,6 +8,16 @@ end desc 'Run all tests (JS and code in a standalone environment)' task 'docker:test' do begin + + exit 1 unless run_or_fail("git remote update") + + checkout = "master" + if hash = ENV['COMMIT_HASH'] + checkout = hash + end + exit 1 unless run_or_fail("git checkout #{checkout}") + exit 1 unless run_or_fail("bundle") + puts "Cleaning up old test tmp data in tmp/test_data" `rm -fr tmp/test_data && mkdir -p tmp/test_data/redis && mkdir tmp/test_data/pg`