From 561d4f84b3bce9080fce6a5058eaee5b0a16fabb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 9 Jan 2021 20:55:56 +0200 Subject: [PATCH] tests: remove tmp files on OK live_test.v run --- vlib/v/tests/live_test.v | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vlib/v/tests/live_test.v b/vlib/v/tests/live_test.v index 420c6afd6a..7f5dd69654 100644 --- a/vlib/v/tests/live_test.v +++ b/vlib/v/tests/live_test.v @@ -37,6 +37,8 @@ const ( res_changed_file = os.join_path(os.temp_dir(), 'CHANGED.txt') res_another_file = os.join_path(os.temp_dir(), 'ANOTHER.txt') res_stop_file = os.join_path(os.temp_dir(), 'STOP.txt') + cleanup_files = [tmp_file, source_file, genexe_file, output_file, res_original_file, + res_changed_file, res_another_file, res_stop_file] live_program_source = " module main @@ -158,6 +160,9 @@ fn testsuite_end() { assert histogram['ORIGINAL'] > 0 assert histogram['CHANGED'] + histogram['ANOTHER'] > 0 // assert histogram['END'] > 0 + for tfile in cleanup_files { + os.rm(tfile) + } } fn change_source(new string) { @@ -190,8 +195,8 @@ fn setup_cycles_environment() { mut max_live_cycles := 1000 mut max_wait_cycles := 400 if os.user_os() == 'macos' { -// max_live_cycles *= 5 -// max_wait_cycles *= 5 + // max_live_cycles *= 5 + // max_wait_cycles *= 5 } os.setenv('LIVE_CYCLES', '$max_live_cycles', true) os.setenv('WAIT_CYCLES', '$max_wait_cycles', true)