# HG changeset patch
# User Georges Racinet <georges.racinet@octobus.net>
# Date 1679863668 -7200
#      Sun Mar 26 22:47:48 2023 +0200
# Node ID 8a82701d0b1735a1c9af92adc31ed23aa8477eba
# Parent  c7d863a582d149a4f266fcfd625c58064d7ca000
RHGitaly Comparison tests: remove build time from startup timeout

Nicer when starting from scratch: we avoid a timeout error.
It's still worthwile to have CI do it before hand, because the build log
ends up in the job log.

diff --git a/tests_with_gitaly/rhgitaly.py b/tests_with_gitaly/rhgitaly.py
--- a/tests_with_gitaly/rhgitaly.py
+++ b/tests_with_gitaly/rhgitaly.py
@@ -31,12 +31,15 @@
         socket_path = self.home_dir / 'rhgitaly.socket'
         url = 'unix:%s' % socket_path.resolve()
         env['RHGITALY_LISTEN_URL'] = url
+        rhgitaly_dir = HGITALY_SOURCE_ROOT / 'rust/rhgitaly'
+        subprocess.check_call(('cargo', 'build'),
+                              cwd=rhgitaly_dir)
         with open(self.home_dir / 'rhgitaly.log', 'w') as logf:
             rhgitaly = subprocess.Popen(
                 ('cargo', 'run'),
                 stdout=logf, stderr=logf,
                 env=env,
-                cwd=HGITALY_SOURCE_ROOT / 'rust/rhgitaly'
+                cwd=rhgitaly_dir,
             )
 
         try: