diff --git a/ptests/ptests.ml b/ptests/ptests.ml index 0a87b61e2b82271cfdfa54996703d24e9081bc3d..070334fcda0ba7673730cdca6c48a503e32835e9 100644 --- a/ptests/ptests.ml +++ b/ptests/ptests.ml @@ -63,6 +63,11 @@ module Filename = struct fun a b -> temp_file a b let sanitize f = String.escaped f + + let sanitize_with_space = + let regexp = Str.regexp "[\\] " in + let subst = Str.global_replace regexp " " in + subst end let str_string_match1 regexp line pos = @@ -141,7 +146,7 @@ let config_name ~env name = let macro_post_options = ref "" (* value set to @PTEST_POST_OPTIONS@ macro *) let macro_pre_options = ref "" (* value set to @PTEST_PRE_OPTIONS@ macro *) let macro_options = ref "@PTEST_PRE_OPTIONS@ @PTEST_OPT@ @PTEST_POST_OPTIONS@" -let macro_default_options = ref "-journal-disable -check -no-autoload-plugins -add-symbolic-path @PTEST_SESSION@" +let macro_default_options = ref "-journal-disable -check -no-autoload-plugins -add-symbolic-path=\"@PTEST_SESSION@\"" let macro_frama_c_exe = ref "frama-c" let macro_frama_c_cmd = ref "@frama-c-exe@ @PTEST_DEFAULT_OPTIONS@" @@ -1187,10 +1192,12 @@ module Fmt = struct end let pp_list_deps fmt l = List.iter (fun s -> + let s = Filename.sanitize_with_space s in if String.contains s '*' then Format.fprintf fmt " (glob_files %S)" s else Format.fprintf fmt " %S" s) l + let pp_command_deps fmt command = Format.fprintf fmt "%a %S (package frama-c)%a" pp_list_deps command.deps.deps_cmd diff --git a/tests/misc/dune b/tests/misc/dune new file mode 100644 index 0000000000000000000000000000000000000000..350ae7160b3c799e3d13271dd4342fb7e90279c8 --- /dev/null +++ b/tests/misc/dune @@ -0,0 +1,3 @@ +(subdir + result/custom_machdep + (copy_files ../../custom_machdep/*)) diff --git a/tests/misc/global_decl_loc.i b/tests/misc/global_decl_loc.i index 7955b774e26b1c68c70f8451b9dd9b8463989b7d..755b5d1a822b7bb62ddfdb6ccb50a6de0fca2925 100644 --- a/tests/misc/global_decl_loc.i +++ b/tests/misc/global_decl_loc.i @@ -1,6 +1,6 @@ /* run.config COMMENT: with dune, the LIBS directive must be replaced by a MODULE directive (see also ./test_config file) - LIBS: global_decl_loc + MODULE: global_decl_loc OPT: %{dep:@PTEST_DIR@/global_decl_loc2.i} */ diff --git a/tests/misc/global_decl_loc2.i b/tests/misc/global_decl_loc2.i index 77ea1dfabb166e240936c70641fe093b769db756..964f7e09301f4738337d4a33f1a45156d337844a 100644 --- a/tests/misc/global_decl_loc2.i +++ b/tests/misc/global_decl_loc2.i @@ -1,7 +1,7 @@ /* run.config* COMMENT: with dune, the LIBS directive must be replaced by a MODULE directive (see also ./test_config file) - LIBS: global_decl_loc + MODULE: global_decl_loc OPT: %{dep:@PTEST_DIR@/global_decl_loc.i} */ extern int g; diff --git a/tests/misc/oracle/log_selfrec.res.oracle b/tests/misc/oracle/log_selfrec.res.oracle index a6950e931a0ec56f8a87657fbc4d32fd71e54c8d..befe7bc2d0fa5c1653ace7344098c437ca313627 100644 --- a/tests/misc/oracle/log_selfrec.res.oracle +++ b/tests/misc/oracle/log_selfrec.res.oracle @@ -1,5 +1,5 @@ [report] Monitoring events [kernel] User Error: option `-foobar' is unknown. - use `bin/toplevel.opt -help' for more information. + use `frama-c -help' for more information. [report] User Error: Invalid action ("JAZZ") [kernel] Plug-in report aborted: invalid user input. diff --git a/tests/misc/with space/dune b/tests/misc/with space/dune new file mode 100644 index 0000000000000000000000000000000000000000..9cc2db5f1a3243750bd48fd7832f6a9b3fe0e1e8 --- /dev/null +++ b/tests/misc/with space/dune @@ -0,0 +1,7 @@ +(executable ; MODULE #1 FOR TEST FILES: "with-space.i" + (name "module") + (modules "module") + (modes plugin) + (libraries frama-c.init.cmdline frama-c.boot frama-c.kernel ) + (flags :standard -w -50-9-32-6-34 -open Frama_c_kernel) +) diff --git a/tests/misc/with-space.i b/tests/misc/with-space.i index 98f36854e12589e89b66c49274a8bd9556998b20..5a1eddc52babddf2ba7f1b428715ffaf3db82b9b 100644 --- a/tests/misc/with-space.i +++ b/tests/misc/with-space.i @@ -1,4 +1,4 @@ /* run.config - SCRIPT: @PTEST_DIR@/with\ space/module + LIBS: ../with\ space/module OPT: */ diff --git a/tests/ptests_config b/tests/ptests_config index 15fd9395430700ee808ca40164010d5085c85123..5d3871f1993aaa997d1c147444779aa61fed7154 100644 --- a/tests/ptests_config +++ b/tests/ptests_config @@ -10,9 +10,9 @@ DEFAULT_SUITES= float idct impact jcdb libc metrics occurrence pdg pretty_printi DEFAULT_SUITES= rte rte_manual saveload scope slicing sparecode spec syntax -DEFAULT_SUITES= +DEFAULT_SUITES= misc # todo: -IGNORE= DEFAULT_SUITES= fc_script misc make_run_script +IGNORE= DEFAULT_SUITES= fc_script make_run_script DEFAULT_SUITES= value/traces # todo: