summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-24 13:46:51 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-01-24 13:46:51 -0800
commit2865ca316e5b9512ffd8a7d784355e469a115717 (patch)
tree487130507840b2a94f982d635f0d1d78fa54649c /tasks
parent8324a3f2acabe056bbab2405ae7765f36a64a7c8 (diff)
downloadchef-2865ca316e5b9512ffd8a7d784355e469a115717.tar.gz
splice git checkout of chef into external tests
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'tasks')
-rwxr-xr-xtasks/bin/run_external_test3
1 files changed, 3 insertions, 0 deletions
diff --git a/tasks/bin/run_external_test b/tasks/bin/run_external_test
index 1925c3e125..7f0b002525 100755
--- a/tasks/bin/run_external_test
+++ b/tasks/bin/run_external_test
@@ -11,12 +11,15 @@ include Chef::Mixin::ShellOut
github_repo = ARGV.shift
git_thing = ARGV.shift
+chef_dir = File.expand_path("../..", File.dirname(__FILE__))
+
Dir.mktmpdir("chef-external-test") do |dir|
git_url = "https://github.com/#{github_repo}"
Dir.rmdir dir
shell_out!("git clone #{git_url} #{dir}", live_stream: STDOUT)
Dir.chdir(dir) do
shell_out!("git checkout #{git_thing}", live_stream: STDOUT)
+ File.open("Gemfile", "a") { |f| f.write("gem 'chef', path: '#{chef_dir}'") }
Bundler.with_clean_env do
shell_out!("bundle install", live_stream: STDOUT)
shell_out!("bundle exec #{ARGV.join(" ")}", live_stream: STDOUT)