Commit 34a5c0ab authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Merge from heptapod branch

In release branches, tests are almost exclusively run from
the CI, were the test harness improvement avoiding rebuild
of Workhorse should entirely be bypassed.

This merge will be validated by CI, hence making sure that
we didn't introduce trouble for the next release.

--HG--
branch : heptapod-0-21
Pipeline #20277 passed with stages
in 43 minutes and 10 seconds
......@@ -330,7 +330,10 @@ def wait(service)
def setup_workhorse
start = Time.now
return if skip_compile_workhorse?
if skip_compile_workhorse?
puts "\n==> GitLab Workhorse already setup and does not need rebuild."
return
end
puts "\n==> Setting up GitLab Workhorse..."
......@@ -351,12 +354,16 @@ def skip_compile_workhorse?
end
def workhorse_source_clean?
out = IO.popen(%w[git status --porcelain workhorse], &:read)
out = IO.popen(%w[hg status -mard workhorse], &:read)
$?.success? && out.empty?
end
def workhorse_tree
IO.popen(%w[git rev-parse HEAD:workhorse], &:read)
# Upstream GitLab uses the tree oid of workhorse/ to detect changes.
# Let's use the id of latest changeset that changed it, even if
# that is not so well-defined (it's acceptable to have sporadic
# unneeded rebuilds).
IO.popen(%w[hg log -l 1 workhorse -T {node}], &:read)
end
def workhorse_tree_file
......@@ -602,6 +609,8 @@ def component_timed_setup(component, install_dir:, version:, task:)
yield if block_given?
puts " #{component} set up in #{Time.now - start} seconds...\n"
else
puts "\n==> #{component} already setup and does not need rebuild."
end
rescue ComponentFailedToInstallError
puts "\n#{component} failed to install, cleaning up #{install_dir}!\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment