@@ -1193,7 +1193,7 @@ def retag(*args)
1193
1193
env = { }
1194
1194
env [ 'TRUFFLERUBYOPT' ] = [ *ENV [ 'TRUFFLERUBYOPT' ] , '--experimental-options' , '--exceptions-print-java=true' ] . join ( ' ' )
1195
1195
1196
- select_tests ( 'test/truffle/compiler' , args ) . each do |test_script |
1196
+ run_tests ( 'test/truffle/compiler' , args ) do |test_script |
1197
1197
sh env , test_script
1198
1198
end
1199
1199
end
@@ -1291,7 +1291,7 @@ def retag(*args)
1291
1291
end
1292
1292
end
1293
1293
1294
- private def select_tests ( tests_path , tests )
1294
+ private def run_tests ( tests_path , tests )
1295
1295
tests_path = "#{ TRUFFLERUBY_DIR } /#{ tests_path } "
1296
1296
test_names = tests . empty? ? '*' : '{' + tests . join ( ',' ) + '}'
1297
1297
@@ -1303,27 +1303,38 @@ def retag(*args)
1303
1303
exit 1
1304
1304
end
1305
1305
1306
- candidates
1306
+ STDERR . puts
1307
+ candidates . each do |test_script |
1308
+ STDERR . puts "[jt] Running #{ test_script } ..."
1309
+ start = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
1310
+ begin
1311
+ yield test_script
1312
+ ensure
1313
+ finish = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
1314
+ duration = finish - start
1315
+ STDERR . puts "[jt] #{ test_script } took #{ '%.1f' % duration } s\n \n \n "
1316
+ end
1317
+ end
1307
1318
end
1308
1319
1309
1320
private def test_integration ( *args )
1310
- select_tests ( 'test/truffle/integration' , args ) . each do |test_script |
1321
+ run_tests ( 'test/truffle/integration' , args ) do |test_script |
1311
1322
sh test_script
1312
1323
end
1313
1324
end
1314
1325
1315
1326
private def test_gems ( *args )
1316
1327
gem_test_pack
1317
1328
1318
- select_tests ( 'test/truffle/gems' , args ) . each do |test_script |
1329
+ run_tests ( 'test/truffle/gems' , args ) do |test_script |
1319
1330
sh test_script
1320
1331
end
1321
1332
end
1322
1333
1323
1334
private def test_ecosystem ( *args )
1324
1335
gem_test_pack if gem_test_pack?
1325
1336
1326
- select_tests ( 'test/truffle/ecosystem' , args ) . each do |test_script |
1337
+ run_tests ( 'test/truffle/ecosystem' , args ) do |test_script |
1327
1338
sh test_script , *( gem_test_pack if gem_test_pack? )
1328
1339
end
1329
1340
end
0 commit comments