diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-05-16 22:43:39 +0200 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-05-16 22:43:39 +0200 |
commit | 034d8ced8836f6380e758531d114f252dd13a666 (patch) | |
tree | cab7094dd820d6c3a299f3191820c57228484766 /scripts/gitaly-test-spawn | |
parent | ddc29487a71d6557c6b1e7ca4e67f7a99384777b (diff) | |
parent | 790fee0dc724c734c7430f773ae8f7f91df6bf2b (diff) | |
download | gitlab-ce-winh-cleanup-changes_tab_vue_refactoring.tar.gz |
Remove unrelated changes from changes_tab_vue_refactoringwinh-cleanup-changes_tab_vue_refactoring
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 |