Skip to content

Commit 412895a

Browse files
hsbtmatzbot
authored andcommitted
[ruby/rubygems] Try to split and run three runners for Windows
I organized all examples the followings: ``` Total test time: 2468.41 seconds Total files: 168 Group A: 42 files, 617.08 seconds Group B: 42 files, 617.05 seconds Group C: 42 files, 617.14 seconds Group D: 42 files, 617.14 seconds ``` ruby/rubygems@94d41e6c7c
1 parent 6d0c959 commit 412895a

File tree

2 files changed

+195
-0
lines changed

2 files changed

+195
-0
lines changed

spec/bundler/spec_helper.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
require_relative "support/matchers"
3939
require_relative "support/permissions"
4040
require_relative "support/platforms"
41+
require_relative "support/windows_tag_group"
4142

4243
$debug = false
4344

@@ -56,6 +57,7 @@ def self.ruby=(ruby)
5657
config.include Spec::Path
5758
config.include Spec::Platforms
5859
config.include Spec::Permissions
60+
config.include Spec::WindowsTagGroup
5961

6062
# Enable flags like --only-failures and --next-failure
6163
config.example_status_persistence_file_path = ".rspec_status"
@@ -129,4 +131,12 @@ def self.ruby=(ruby)
129131
ensure
130132
reset!
131133
end
134+
135+
Spec::WindowsTagGroup::EXAMPLE_MAPPINGS.each do |tag, file_paths|
136+
file_pattern = Regexp.union(file_paths.map {|path| Regexp.new(Regexp.escape(path) + "$") })
137+
138+
config.define_derived_metadata(file_path: file_pattern) do |metadata|
139+
metadata[tag] = true
140+
end
141+
end
132142
end
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# frozen_string_literal: true
2+
3+
module Spec
4+
module WindowsTagGroup
5+
EXAMPLE_MAPPINGS = {
6+
windows_a: [
7+
"spec/runtime/setup_spec.rb",
8+
"spec/commands/install_spec.rb",
9+
"spec/commands/add_spec.rb",
10+
"spec/install/gems/compact_index_spec.rb",
11+
"spec/commands/config_spec.rb",
12+
"spec/commands/pristine_spec.rb",
13+
"spec/install/gemfile/path_spec.rb",
14+
"spec/update/git_spec.rb",
15+
"spec/commands/open_spec.rb",
16+
"spec/commands/remove_spec.rb",
17+
"spec/commands/show_spec.rb",
18+
"spec/plugins/source/example_spec.rb",
19+
"spec/commands/console_spec.rb",
20+
"spec/runtime/require_spec.rb",
21+
"spec/runtime/env_helpers_spec.rb",
22+
"spec/runtime/gem_tasks_spec.rb",
23+
"spec/install/gemfile_spec.rb",
24+
"spec/commands/fund_spec.rb",
25+
"spec/commands/init_spec.rb",
26+
"spec/bundler/ruby_dsl_spec.rb",
27+
"spec/bundler/mirror_spec.rb",
28+
"spec/bundler/source/git/git_proxy_spec.rb",
29+
"spec/bundler/source_list_spec.rb",
30+
"spec/bundler/plugin/installer_spec.rb",
31+
"spec/bundler/friendly_errors_spec.rb",
32+
"spec/resolver/platform_spec.rb",
33+
"spec/bundler/fetcher/downloader_spec.rb",
34+
"spec/update/force_spec.rb",
35+
"spec/bundler/env_spec.rb",
36+
"spec/install/gems/mirror_spec.rb",
37+
"spec/install/failure_spec.rb",
38+
"spec/bundler/yaml_serializer_spec.rb",
39+
"spec/bundler/environment_preserver_spec.rb",
40+
"spec/install/gemfile/install_if_spec.rb",
41+
"spec/install/gems/gemfile_source_header_spec.rb",
42+
"spec/bundler/fetcher/base_spec.rb",
43+
"spec/bundler/rubygems_integration_spec.rb",
44+
"spec/bundler/worker_spec.rb",
45+
"spec/bundler/dependency_spec.rb",
46+
"spec/bundler/ui_spec.rb",
47+
"spec/bundler/plugin/source_list_spec.rb",
48+
"spec/bundler/source/path_spec.rb",
49+
],
50+
windows_b: [
51+
"spec/install/gemfile/git_spec.rb",
52+
"spec/install/gems/standalone_spec.rb",
53+
"spec/commands/lock_spec.rb",
54+
"spec/cache/gems_spec.rb",
55+
"spec/other/major_deprecation_spec.rb",
56+
"spec/install/gems/dependency_api_spec.rb",
57+
"spec/install/gemfile/gemspec_spec.rb",
58+
"spec/plugins/install_spec.rb",
59+
"spec/commands/binstubs_spec.rb",
60+
"spec/install/gems/flex_spec.rb",
61+
"spec/runtime/inline_spec.rb",
62+
"spec/commands/post_bundle_message_spec.rb",
63+
"spec/runtime/executable_spec.rb",
64+
"spec/lock/git_spec.rb",
65+
"spec/plugins/hook_spec.rb",
66+
"spec/install/allow_offline_install_spec.rb",
67+
"spec/install/gems/post_install_spec.rb",
68+
"spec/install/gemfile/ruby_spec.rb",
69+
"spec/install/security_policy_spec.rb",
70+
"spec/install/yanked_spec.rb",
71+
"spec/update/gemfile_spec.rb",
72+
"spec/runtime/load_spec.rb",
73+
"spec/plugins/command_spec.rb",
74+
"spec/commands/version_spec.rb",
75+
"spec/install/prereleases_spec.rb",
76+
"spec/bundler/uri_credentials_filter_spec.rb",
77+
"spec/bundler/plugin_spec.rb",
78+
"spec/install/gems/mirror_probe_spec.rb",
79+
"spec/plugins/list_spec.rb",
80+
"spec/bundler/compact_index_client/parser_spec.rb",
81+
"spec/bundler/gem_version_promoter_spec.rb",
82+
"spec/other/cli_dispatch_spec.rb",
83+
"spec/bundler/source/rubygems_spec.rb",
84+
"spec/cache/platform_spec.rb",
85+
"spec/update/gems/fund_spec.rb",
86+
"spec/bundler/stub_specification_spec.rb",
87+
"spec/bundler/retry_spec.rb",
88+
"spec/bundler/installer/spec_installation_spec.rb",
89+
"spec/bundler/spec_set_spec.rb",
90+
"spec/quality_es_spec.rb",
91+
"spec/bundler/index_spec.rb",
92+
"spec/other/cli_man_pages_spec.rb",
93+
],
94+
windows_c: [
95+
"spec/commands/newgem_spec.rb",
96+
"spec/commands/exec_spec.rb",
97+
"spec/commands/clean_spec.rb",
98+
"spec/commands/platform_spec.rb",
99+
"spec/cache/git_spec.rb",
100+
"spec/install/gemfile/groups_spec.rb",
101+
"spec/commands/cache_spec.rb",
102+
"spec/commands/check_spec.rb",
103+
"spec/commands/list_spec.rb",
104+
"spec/install/path_spec.rb",
105+
"spec/bundler/cli_spec.rb",
106+
"spec/install/bundler_spec.rb",
107+
"spec/install/git_spec.rb",
108+
"spec/commands/doctor_spec.rb",
109+
"spec/bundler/dsl_spec.rb",
110+
"spec/install/gems/fund_spec.rb",
111+
"spec/install/gems/env_spec.rb",
112+
"spec/bundler/ruby_version_spec.rb",
113+
"spec/bundler/definition_spec.rb",
114+
"spec/install/gemfile/eval_gemfile_spec.rb",
115+
"spec/plugins/source_spec.rb",
116+
"spec/install/gems/dependency_api_fallback_spec.rb",
117+
"spec/plugins/uninstall_spec.rb",
118+
"spec/bundler/plugin/index_spec.rb",
119+
"spec/bundler/bundler_spec.rb",
120+
"spec/bundler/fetcher_spec.rb",
121+
"spec/bundler/source/rubygems/remote_spec.rb",
122+
"spec/bundler/lockfile_parser_spec.rb",
123+
"spec/cache/cache_path_spec.rb",
124+
"spec/bundler/source/git_spec.rb",
125+
"spec/bundler/source_spec.rb",
126+
"spec/commands/ssl_spec.rb",
127+
"spec/bundler/fetcher/compact_index_spec.rb",
128+
"spec/bundler/plugin/api_spec.rb",
129+
"spec/bundler/endpoint_specification_spec.rb",
130+
"spec/bundler/fetcher/index_spec.rb",
131+
"spec/bundler/settings/validator_spec.rb",
132+
"spec/bundler/build_metadata_spec.rb",
133+
"spec/bundler/current_ruby_spec.rb",
134+
"spec/bundler/installer/gem_installer_spec.rb",
135+
"spec/bundler/cli_common_spec.rb",
136+
"spec/bundler/ci_detector_spec.rb",
137+
],
138+
windows_d: [
139+
"spec/commands/outdated_spec.rb",
140+
"spec/commands/update_spec.rb",
141+
"spec/lock/lockfile_spec.rb",
142+
"spec/install/deploy_spec.rb",
143+
"spec/install/gemfile/sources_spec.rb",
144+
"spec/runtime/self_management_spec.rb",
145+
"spec/install/gemfile/specific_platform_spec.rb",
146+
"spec/commands/info_spec.rb",
147+
"spec/install/gems/resolving_spec.rb",
148+
"spec/install/gemfile/platform_spec.rb",
149+
"spec/bundler/gem_helper_spec.rb",
150+
"spec/install/global_cache_spec.rb",
151+
"spec/runtime/platform_spec.rb",
152+
"spec/update/gems/post_install_spec.rb",
153+
"spec/install/gems/native_extensions_spec.rb",
154+
"spec/install/force_spec.rb",
155+
"spec/cache/path_spec.rb",
156+
"spec/install/gemspecs_spec.rb",
157+
"spec/commands/help_spec.rb",
158+
"spec/bundler/shared_helpers_spec.rb",
159+
"spec/bundler/settings_spec.rb",
160+
"spec/resolver/basic_spec.rb",
161+
"spec/install/gemfile/force_ruby_platform_spec.rb",
162+
"spec/commands/licenses_spec.rb",
163+
"spec/install/gemfile/lockfile_spec.rb",
164+
"spec/bundler/fetcher/dependency_spec.rb",
165+
"spec/quality_spec.rb",
166+
"spec/bundler/remote_specification_spec.rb",
167+
"spec/install/process_lock_spec.rb",
168+
"spec/install/binstubs_spec.rb",
169+
"spec/bundler/compact_index_client/updater_spec.rb",
170+
"spec/bundler/ui/shell_spec.rb",
171+
"spec/other/ext_spec.rb",
172+
"spec/commands/issue_spec.rb",
173+
"spec/update/path_spec.rb",
174+
"spec/bundler/plugin/api/source_spec.rb",
175+
"spec/install/gems/win32_spec.rb",
176+
"spec/bundler/plugin/dsl_spec.rb",
177+
"spec/runtime/requiring_spec.rb",
178+
"spec/bundler/plugin/events_spec.rb",
179+
"spec/bundler/resolver/candidate_spec.rb",
180+
"spec/bundler/digest_spec.rb",
181+
"spec/bundler/fetcher/gem_remote_fetcher_spec.rb",
182+
],
183+
}.freeze
184+
end
185+
end

0 commit comments

Comments
 (0)