[rubygems/rubygems] Allow smoother breaking changes in test env
https://github.com/rubygems/rubygems/commit/0fc3feae19
This commit is contained in:
parent
b37ffb9345
commit
ec13ccdf53
@ -102,7 +102,18 @@ module Spec
|
||||
end
|
||||
|
||||
def tmp(*path)
|
||||
source_root.join("tmp", scope, *path)
|
||||
tmp_root(scope).join(*path)
|
||||
end
|
||||
|
||||
def tmp_root(scope)
|
||||
source_root.join("tmp", "#{test_env_version}.#{scope}")
|
||||
end
|
||||
|
||||
# Bump this version whenever you make a breaking change to the spec setup
|
||||
# that requires regenerating tmp/.
|
||||
|
||||
def test_env_version
|
||||
1
|
||||
end
|
||||
|
||||
def scope
|
||||
|
@ -57,8 +57,8 @@ module Spec
|
||||
install_test_deps
|
||||
|
||||
(2..Parallel.processor_count).each do |n|
|
||||
source = Path.source_root.join("tmp", "1")
|
||||
destination = Path.source_root.join("tmp", n.to_s)
|
||||
source = Path.tmp_root("1")
|
||||
destination = Path.tmp_root(n.to_s)
|
||||
|
||||
FileUtils.rm_rf destination
|
||||
FileUtils.cp_r source, destination
|
||||
|
Loading…
x
Reference in New Issue
Block a user