summaryrefslogtreecommitdiff
path: root/tasks/bin
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/bin')
-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)