@@ -92,10 +92,6 @@ def docker(*args)
92
92
case arg
93
93
when *docker_distros
94
94
distro_name = arg [ 2 ..-1 ]
95
- when '--graalvm'
96
- install_method = :graalvm
97
- graalvm_tarball = args . shift
98
- graalvm_components = args . shift . split ( ':' ) . map { |path | File . expand_path ( path ) }
99
95
when '--standalone'
100
96
install_method = :standalone
101
97
standalone_tarball = args . shift
@@ -129,6 +125,7 @@ def docker(*args)
129
125
packages << distro . fetch ( 'openssl' )
130
126
packages << distro . fetch ( 'yaml' )
131
127
packages << distro . fetch ( 'cext' )
128
+ packages << distro . fetch ( 'c++' ) if full_test
132
129
133
130
proxy_vars = [ ]
134
131
# There is an issue with dnf + proxy in Fedora 34, install packages outside proxy to workaround
@@ -160,34 +157,7 @@ def docker(*args)
160
157
Dir . mkdir docker_dir
161
158
end
162
159
163
- check_post_install_message = [
164
- "RUN grep 'The Ruby openssl C extension needs to be recompiled on your system to work with the installed libssl' install.log" ,
165
- "RUN grep '/languages/ruby/lib/truffle/post_install_hook.sh' install.log"
166
- ]
167
-
168
160
case install_method
169
- when :graalvm
170
- FileUtils . copy graalvm_tarball , docker_dir unless print_only
171
- graalvm_tarball = File . basename ( graalvm_tarball )
172
- language_dir = graalvm_tarball . include? ( 'java11' ) ? 'languages' : 'jre/languages'
173
-
174
- lines << "COPY #{ graalvm_tarball } /test/"
175
- graalvm_base = '/test/graalvm'
176
- lines << "RUN mkdir #{ graalvm_base } "
177
- lines << "RUN tar -zxf #{ graalvm_tarball } -C #{ graalvm_base } --strip-components=1"
178
- graalvm_bin = "#{ graalvm_base } /bin"
179
-
180
- graalvm_components . each do |component |
181
- FileUtils . copy component , docker_dir unless print_only
182
- component = File . basename ( component )
183
- lines << "COPY #{ component } /test/"
184
- lines << "RUN #{ graalvm_bin } /gu install --file /test/#{ component } | tee -a install.log"
185
- end
186
- ruby_base = "#{ graalvm_base } /#{ language_dir } /ruby"
187
- ruby_bin = graalvm_bin
188
-
189
- lines . push ( *check_post_install_message )
190
- lines << "RUN #{ ruby_base } /lib/truffle/post_install_hook.sh" if run_post_install_hook
191
161
when :standalone
192
162
FileUtils . copy standalone_tarball , docker_dir unless print_only
193
163
standalone_tarball = File . basename ( standalone_tarball )
@@ -222,29 +192,23 @@ def docker(*args)
222
192
223
193
lines << "ENV PATH=#{ ruby_bin } :$PATH"
224
194
225
- configs = install_method == :graalvm ? %w[ --native --jvm ] : [ '' ]
226
-
227
- configs . each do |c |
228
- lines << "RUN ruby #{ c } --version"
229
- end
195
+ lines << 'RUN ruby --version'
230
196
231
197
if basic_test || full_test
232
- configs . each do |c |
233
- lines << "RUN cp -R #{ ruby_base } /lib/gems /test/clean-gems"
198
+ lines << "RUN cp -R #{ ruby_base } /lib/gems /test/clean-gems"
234
199
235
- gem_install = " ruby #{ c } -S gem install --no-document"
236
- lines << "RUN #{ gem_install } color"
237
- lines << "RUN ruby #{ c } -rcolor -e 'raise unless defined?(Color)'"
200
+ gem_install = ' ruby -S gem install --no-document'
201
+ lines << "RUN #{ gem_install } color"
202
+ lines << "RUN ruby -rcolor -e 'raise unless defined?(Color)'"
238
203
239
- lines << "RUN #{ gem_install } oily_png"
240
- lines << "RUN ruby #{ c } -roily_png -e 'raise unless defined?(OilyPNG::Color)'"
204
+ lines << "RUN #{ gem_install } oily_png"
205
+ lines << "RUN ruby -roily_png -e 'raise unless defined?(OilyPNG::Color)'"
241
206
242
- lines << "RUN #{ gem_install } unf"
243
- lines << "RUN ruby #{ c } -runf -e 'raise unless defined?(UNF)'"
207
+ lines << "RUN #{ gem_install } unf"
208
+ lines << "RUN ruby -runf -e 'raise unless defined?(UNF)'"
244
209
245
- lines << "RUN rm -rf #{ ruby_base } /lib/gems"
246
- lines << "RUN mv /test/clean-gems #{ ruby_base } /lib/gems"
247
- end
210
+ lines << "RUN rm -rf #{ ruby_base } /lib/gems"
211
+ lines << "RUN mv /test/clean-gems #{ ruby_base } /lib/gems"
248
212
end
249
213
250
214
if full_test
@@ -254,19 +218,14 @@ def docker(*args)
254
218
lines << "COPY --chown=test #{ file } #{ file } "
255
219
end
256
220
257
- configs . each do |c |
258
- excludes = %w[ fails slow ]
221
+ excludes = %w[ fails slow ]
259
222
260
- %w[ :command_line :security :language :core :tracepoint :library :capi :library_cext :truffle :truffle_capi ] . each do |set |
261
- t_config = c . empty? ? '' : '-T' + c
262
- t_excludes = excludes . map { |e | '--excl-tag ' + e } . join ( ' ' )
263
- lines << "RUN ruby spec/mspec/bin/mspec -t #{ ruby_bin } /ruby #{ t_config } #{ t_excludes } #{ set } "
264
- end
223
+ %w[ :command_line :security :language :core :tracepoint :library :capi :library_cext :truffle :truffle_capi ] . each do |set |
224
+ t_excludes = excludes . map { |e | '--excl-tag ' + e } . join ( ' ' )
225
+ lines << "RUN ruby spec/mspec/bin/mspec -t #{ ruby_bin } /ruby #{ t_excludes } #{ set } "
265
226
end
266
227
267
- configs . each do |c |
268
- lines << "RUN ruby #{ c } --experimental-options --engine.CompilationFailureAction=ExitVM --compiler.TreatPerformanceWarningsAsErrors=all --compiler.IterativePartialEscape --engine.MultiTier=false pe/pe.rb || true"
269
- end
228
+ lines << 'RUN ruby --experimental-options --engine.CompilationFailureAction=ExitVM --compiler.TreatPerformanceWarningsAsErrors=all --compiler.IterativePartialEscape --engine.MultiTier=false pe/pe.rb || true'
270
229
end
271
230
272
231
lines << 'CMD bash'
0 commit comments