--- a/rakelib/test.rake Sun Nov 20 23:28:58 2016 +0000
+++ b/rakelib/test.rake Mon Nov 21 23:00:19 2016 +0000
@@ -55,6 +55,13 @@
coveragerportformat_dot_st = BUILD_DIR / 'stx' / 'goodies' / 'builder' / 'reports' / 'Builder__CoverageReportFormat.st'
report_dir = File.expand_path(REPORT_DIR)
+ tmp_dir = File.expand_path(TMP_DIR)
+
+ # Set STX_TMPDIR environment to make sure all temporary files created by
+ # Smalltalk/X goes to a local tmp directory (which should be discarded
+ # regularly). This helps to avoid garbage to heap up on Windows slaves
+ # assuming workspaces is thrown away often.
+ ENV['STX_TMPDIR'] = tmp_dir
if app
exe_dir = BUILD_DIR / app.directory
@@ -72,6 +79,9 @@
end
end
+ if not File.directory? tmp_dir then
+ mkdir_p tmp_dir
+ end
chdir exe_dir do
packages_args = ''
packages.each { | p | packages_args += " -p #{p}" }
@@ -83,6 +93,7 @@
end
sh "#{exe} #{runner_opts} #{global_opts} -i \"#{BUILD_ID}\" -D \"#{report_dir}\" -r #{report} #{report_opts} #{packages_args}"
end
+ rm_rf tmp_dir
end
task :'setup:tasks:test' do