diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2017-07-31 15:17:14 +0200 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-08-01 10:48:46 +0200 |
commit | e99564568b2fefab8973ce571594aaa888cf8494 (patch) | |
tree | 9d00477a620e6fe3219eed92618f9efe42d5a17c /spec/support | |
parent | a9f56ae16873af40c7f1f753aee4528f0fbc2e8d (diff) | |
download | gitlab-ce-e99564568b2fefab8973ce571594aaa888cf8494.tar.gz |
CI fixes for gitaly-ruby
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/test_env.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 86f9568c12e..f0603dfadde 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -144,10 +144,13 @@ module TestEnv end def start_gitaly(gitaly_dir) - gitaly_exec = File.join(gitaly_dir, 'gitaly') - gitaly_config = File.join(gitaly_dir, 'config.toml') - log_file = Rails.root.join('log/gitaly-test.log').to_s - @gitaly_pid = Bundler.with_original_env { spawn(gitaly_exec, gitaly_config, [:out, :err] => log_file) } + if ENV['CI'].present? + # Gitaly has been spawned outside this process already + return + end + + spawn_script = Rails.root.join('scripts/gitaly-test-spawn').to_s + @gitaly_pid = Bundler.with_original_env { IO.popen([spawn_script], &:read).to_i } end def stop_gitaly |