diff options
author | Stan Hu <stanhu@gmail.com> | 2018-05-17 22:17:20 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-05-17 22:17:20 +0000 |
commit | d3adee5105d4c7745b03ad23999d20fd42b3c575 (patch) | |
tree | b1a67f0dfec96ab4ada3e5363317ce408269e46b /scripts/gitaly-test-spawn | |
parent | f214efb87bd345490277b9962b43752c095c0b2c (diff) | |
parent | d6c8a55189d62430c7ca4ffa6e5bb63f15a7efc1 (diff) | |
download | gitlab-ce-sh-move-delete-groups-api-async.tar.gz |
Merge branch 'master' into 'sh-move-delete-groups-api-async'sh-move-delete-groups-api-async
# Conflicts:
# lib/api/v3/groups.rb
Diffstat (limited to 'scripts/gitaly-test-spawn')
-rwxr-xr-x | scripts/gitaly-test-spawn | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/scripts/gitaly-test-spawn b/scripts/gitaly-test-spawn index ecb68c6acc6..e9f91f75650 100755 --- a/scripts/gitaly-test-spawn +++ b/scripts/gitaly-test-spawn @@ -1,9 +1,23 @@ #!/usr/bin/env ruby -gitaly_dir = 'tmp/tests/gitaly' -env = { 'HOME' => File.expand_path('tmp/tests'), - 'GEM_PATH' => Gem.path.join(':') } -args = %W[#{gitaly_dir}/gitaly #{gitaly_dir}/config.toml] +# This script is used both in CI and in local development 'rspec' runs. -# Print the PID of the spawned process -puts spawn(env, *args, [:out, :err] => 'log/gitaly-test.log') +require_relative 'gitaly_test' + +class GitalyTestSpawn + include GitalyTest + + def run + check_gitaly_config! + + # # Uncomment line below to see all gitaly logs merged into CI trace + # spawn('sleep 1; tail -f log/gitaly-test.log') + + pid = start_gitaly + + # In local development this pid file is used by rspec. + IO.write(File.expand_path('../tmp/tests/gitaly.pid', __dir__), pid) + end +end + +GitalyTestSpawn.new.run |