From a6ecc190409c326b114a6e6f025fc31caff05429 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 5 Feb 2021 18:31:04 +0200 Subject: [PATCH] ci: fix -skip-unused compiler test on windows, using -d no_backtrace --- vlib/v/checker/mark_used.v | 11 +++++++++++ vlib/v/compiler_errors_test.v | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/vlib/v/checker/mark_used.v b/vlib/v/checker/mark_used.v index 4ed7e223ae..aa9235a11a 100644 --- a/vlib/v/checker/mark_used.v +++ b/vlib/v/checker/mark_used.v @@ -42,7 +42,18 @@ fn (mut c Checker) mark_used(ast_files []ast.File) { c.table.used_fns['panic'] = true c.table.used_fns['eprintln'] = true c.table.used_fns['print_backtrace_skipping_top_frames'] = true + c.table.used_fns['print_backtrace_skipping_top_frames_mac'] = true c.table.used_fns['print_backtrace_skipping_top_frames_linux'] = true + c.table.used_fns['print_backtrace_skipping_top_frames_freebsd'] = true + c.table.used_fns['print_backtrace_skipping_top_frames_windows'] = true + c.table.used_fns['print_backtrace_skipping_top_frames_mingw'] = true + c.table.used_fns['print_backtrace_skipping_top_frames_msvc'] = true + c.table.used_fns['print_backtrace_skipping_top_frames_tcc'] = true + c.table.used_fns['is_atty'] = true + c.table.used_fns['add_unhandled_exception_handler'] = true + c.table.used_fns['add_vectored_exception_handler'] = true + c.table.used_fns['unhandled_exception_handler'] = true + c.table.used_fns['restore_codepage'] = true c.table.used_fns['new_array_from_c_array'] = true c.table.used_fns['__new_array_with_default'] = true c.table.used_fns['__new_array'] = true diff --git a/vlib/v/compiler_errors_test.v b/vlib/v/compiler_errors_test.v index ac4180688a..39bc1a6f61 100644 --- a/vlib/v/compiler_errors_test.v +++ b/vlib/v/compiler_errors_test.v @@ -86,8 +86,8 @@ fn test_all() { tasks.add('', module_dir, '-prod run', '.out', module_tests, true) tasks.add('', run_dir, 'run', '.run.out', run_tests, false) tasks.add('', skip_unused_dir, 'run', '.run.out', skip_unused_dir_tests, false) - tasks.add('', skip_unused_dir, '-skip-unused run', '.skip_unused.run.out', skip_unused_dir_tests, - false) + tasks.add('', skip_unused_dir, '-d no_backtrace -skip-unused run', '.skip_unused.run.out', + skip_unused_dir_tests, false) tasks.run() if github_job == 'ubuntu-tcc' { // these should be run serially, since they depend on setting and using environment variables