Skip to content

Commit 1fb9c95

Browse files
committed
tools: support VTEST_KEEP_SESSION=1 ./v test vlib/math
1 parent 645e94e commit 1fb9c95

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎cmd/tools/modules/testing/common.v‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ pub const github_job = os.getenv('GITHUB_JOB')
2323

2424
pub const runner_os = os.getenv('RUNNER_OS') // GitHub runner OS
2525

26+
pub const keep_session = os.getenv('VTEST_KEEP_SESSION') == '1'
27+
2628
pub const show_cmd = os.getenv('VTEST_SHOW_CMD') == '1'
2729

2830
pub const show_start = os.getenv('VTEST_SHOW_START') == '1'
@@ -281,6 +283,11 @@ pub fn new_test_session(_vargs string, will_compile bool) TestSession {
281283
silent_mode: _vargs.contains('-silent')
282284
progress_mode: _vargs.contains('-progress')
283285
}
286+
if keep_session {
287+
ts.rm_binaries = false
288+
println('> vtmp_dir: ${new_vtmp_dir}')
289+
}
290+
284291
ts.handle_test_runner_option()
285292
return ts
286293
}

0 commit comments

Comments
 (0)