@@ -579,7 +579,6 @@ def help
579
579
jt test bundle [--jdebug] tests using bundler
580
580
jt test gems [TESTS] tests using gems
581
581
jt test ecosystem [TESTS] [options] tests using the wider ecosystem such as bundler, Rails, etc
582
- --no-gem-test-pack run without gem test pack
583
582
jt test cexts [--no-openssl] [--no-gems] [test_names...]
584
583
run C extension tests (set GEM_HOME)
585
584
jt test unit run Java unittests
@@ -1210,8 +1209,7 @@ def retag(*args)
1210
1209
end
1211
1210
1212
1211
private def test_ecosystem ( *args )
1213
- use_gem_test_pack = !args . delete ( '--no-gem-test-pack' )
1214
- gem_test_pack if use_gem_test_pack
1212
+ gem_test_pack if gem_test_pack?
1215
1213
1216
1214
tests_path = "#{ TRUFFLERUBY_DIR } /test/truffle/ecosystem"
1217
1215
single_test = !args . empty?
@@ -1233,7 +1231,7 @@ def retag(*args)
1233
1231
1234
1232
success = candidates . all? do |test_script |
1235
1233
next true if test_script . end_with? 'shared.sh'
1236
- sh test_script , *( '--no-gem-test-pack' unless use_gem_test_pack ) , continue_on_failure : true
1234
+ sh test_script , *( gem_test_pack if gem_test_pack? ) , continue_on_failure : true
1237
1235
end
1238
1236
exit success
1239
1237
end
@@ -1354,14 +1352,19 @@ def mspec(*args)
1354
1352
run_mspec env_vars , command , *options , *prefixed_ruby_args , *args
1355
1353
end
1356
1354
1355
+ def gem_test_pack?
1356
+ return true if ci?
1357
+ Dir . exist? ( File . expand_path ( 'truffleruby-gem-test-pack' , TRUFFLERUBY_DIR ) )
1358
+ end
1359
+
1357
1360
def gem_test_pack
1358
1361
name = 'truffleruby-gem-test-pack'
1359
1362
gem_test_pack = File . expand_path ( name , TRUFFLERUBY_DIR )
1360
1363
1361
1364
unless Dir . exist? ( gem_test_pack )
1362
1365
$stderr. puts 'Cloning the truffleruby-gem-test-pack repository'
1363
1366
unless Remotes . bitbucket
1364
- abort 'Need a git remote in truffleruby with the internal repository URL or use --no-gem-test-pack option '
1367
+ abort 'Need a git remote in truffleruby with the internal repository URL'
1365
1368
end
1366
1369
url = Remotes . url ( Remotes . bitbucket ) . sub ( 'truffleruby' , name )
1367
1370
sh 'git' , 'clone' , url
@@ -1951,16 +1954,21 @@ def native_launcher
1951
1954
alias :'native-launcher' :native_launcher
1952
1955
1953
1956
def rubocop ( *args )
1954
- gem_home = "#{ gem_test_pack } /rubocop-gems"
1955
- env = {
1956
- 'GEM_HOME' => gem_home ,
1957
- 'GEM_PATH' => gem_home ,
1958
- 'PATH' => "#{ gem_home } /bin:#{ ENV [ 'PATH' ] } "
1959
- }
1960
1957
if args . empty? or args . all? { |arg | arg . start_with? ( '-' ) }
1961
1958
args += RUBOCOP_INCLUDE_LIST
1962
1959
end
1963
- sh env , 'ruby' , "#{ gem_home } /bin/rubocop" , *args
1960
+
1961
+ if gem_test_pack?
1962
+ gem_home = "#{ gem_test_pack } /rubocop-gems"
1963
+ env = {
1964
+ 'GEM_HOME' => gem_home ,
1965
+ 'GEM_PATH' => gem_home ,
1966
+ 'PATH' => "#{ gem_home } /bin:#{ ENV [ 'PATH' ] } "
1967
+ }
1968
+ sh env , 'ruby' , "#{ gem_home } /bin/rubocop" , *args
1969
+ else
1970
+ sh 'rubocop' , '_0.66.0_' , *args
1971
+ end
1964
1972
end
1965
1973
1966
1974
def command_format ( *args )
@@ -2065,7 +2073,7 @@ def make_specializations_protected
2065
2073
new_content << line
2066
2074
end
2067
2075
else
2068
- looking = line . match? ( /^ *@(Specialization|Fallback|CreateCast)/ )
2076
+ looking = /^ *@(Specialization|Fallback|CreateCast)/ =~ line
2069
2077
new_content << line
2070
2078
if looking
2071
2079
braces = count_braces . ( line )
@@ -2082,7 +2090,7 @@ def make_specializations_protected
2082
2090
changed
2083
2091
end
2084
2092
2085
- def lint ( * args )
2093
+ def lint
2086
2094
check_filename_length
2087
2095
rubocop
2088
2096
sh 'tool/lint.sh'
0 commit comments