Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
7b2da10cf18f
Commit
a3e848ed
authored
Apr 05, 2021
by
Georges Racinet
🦑
Browse files
Merged test harness improvement from heptapod-stable
--HG-- branch : heptapod
parents
2bf3b27f8fd7
22de94601b66
Pipeline
#20275
passed with stages
in 36 minutes and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
spec/support/helpers/test_env.rb
View file @
7b2da10c
...
...
@@ -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[g
it
status -
-porcelain
workhorse]
,
&
:read
)
out
=
IO
.
popen
(
%w[
h
g 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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment