From 700686735701358951a5c7d2352954432b298d05 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 28 Oct 2020 14:57:35 +0100 Subject: [PATCH] [aorai] avoid Filename.concat in test script --- src/plugins/aorai/tests/Aorai_test.ml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/plugins/aorai/tests/Aorai_test.ml b/src/plugins/aorai/tests/Aorai_test.ml index 2bf03166acb..14137309241 100644 --- a/src/plugins/aorai/tests/Aorai_test.ml +++ b/src/plugins/aorai/tests/Aorai_test.ml @@ -71,12 +71,17 @@ let extend () = wp_compute_kf kf in run f; + let tmpdir = Filename.get_temp_dir_name () in + let tmpdir = + match Filename.chop_suffix_opt ~suffix:"/" tmpdir with + | None -> tmpdir + | Some dir -> dir + in let tmpfile = - Filename.(concat (get_temp_dir_name ()) - ("aorai_" ^ - (chop_extension - (basename (List.hd (Kernel.Files.get()):>string))) ^ - "_" ^ (string_of_int (TestNumber.get ())) ^ ".i")) + tmpdir ^ "/aorai_" ^ + Filename.( + chop_extension (basename (List.hd (Kernel.Files.get()):>string))) ^ + "_" ^ (string_of_int (TestNumber.get ())) ^ ".i" in let () = Extlib.safe_at_exit -- GitLab