From d8c480cc8daf6be1041ad8b307e6cd515a6685c8 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 30 Apr 2024 05:04:28 +0300 Subject: [PATCH] ci: workaround defer codegen failing with nested if blocks and -cstrict in vdoc_file_test.v --- cmd/tools/vdoc/tests/vdoc_file_test.v | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/tools/vdoc/tests/vdoc_file_test.v b/cmd/tools/vdoc/tests/vdoc_file_test.v index 57ae45bc6d..4f0c393928 100644 --- a/cmd/tools/vdoc/tests/vdoc_file_test.v +++ b/cmd/tools/vdoc/tests/vdoc_file_test.v @@ -75,20 +75,16 @@ fn test_out_path() { if os.getenv('CI') == 'true' { default_output_path := os.join_path(vroot, 'vlib', small_pure_v_vlib_module, '_docs') os.execute_opt('${vexe} doc -f html -m vlib/${small_pure_v_vlib_module}')! - defer { - os.rmdir_all(default_output_path) or {} - } final_html_path := os.join_path(default_output_path, '${small_pure_v_vlib_module}.html') assert os.exists(final_html_path), final_html_path // Custom out path (no `_docs` subdir). out_dir := os.join_path(vroot, 'vlib', small_pure_v_vlib_module, 'docs') os.execute_opt('${vexe} doc -f html -m -o ${out_dir} ${small_pure_v_vlib_module}')! - defer { - os.rmdir_all(out_dir) or {} - } out_html_path := os.join_path(out_dir, '${small_pure_v_vlib_module}.html') assert os.exists(out_html_path), out_html_path + os.rmdir_all(out_dir) or {} + os.rmdir_all(default_output_path) or {} return }