diff --git a/ptests/ptests.ml b/ptests/ptests.ml index 737b2999a22b46aa3b095c4698bce89da0adb002..304e6ee94a8a8aac1eb4258b4402ab8ef0740b8e 100644 --- a/ptests/ptests.ml +++ b/ptests/ptests.ml @@ -1394,6 +1394,7 @@ let command_string ~env ~result_fmt ~oracle_fmt command = (alias %S)\n \ (targets %S %S %a %a)\n \ (deps %S %S %S %a %a)\n \ + (enabled_if (and true %a))\n\ (action (run %s %S %S %a))\n\ )@." (* rule: *) @@ -1411,6 +1412,8 @@ let command_string ~env ~result_fmt ~oracle_fmt command = wtest.oracle_err pp_list (List.map (Filename.concat wtest.oracle_dir) command.log_files) pp_command_deps command + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) !wrapper_cmd wrapper_basename @@ -1434,6 +1437,7 @@ let command_string ~env ~result_fmt ~oracle_fmt command = (alias %S)\n \ (targets %S %S %a %a)\n \ (deps %a)\n \ + (enabled_if (and true %a))\n\ (action (with-stderr-to %S (with-stdout-to %S (%s (system %S)))))\n\ )@." (* rule: *) @@ -1447,6 +1451,8 @@ let command_string ~env ~result_fmt ~oracle_fmt command = pp_list command.bin_files (* deps: *) pp_command_deps command + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) cmderrlog cmdreslog @@ -1458,6 +1464,7 @@ let command_string ~env ~result_fmt ~oracle_fmt command = Format.fprintf result_fmt "(rule ; FILTER %s #%d OF TEST FILE %S\n \ (deps %S) + (enabled_if (and true %a))\n\ (action (with-stdout-to %S (with-accepted-exit-codes (or 0 1 2 125) (system %S))))\n\ )@." (* rule: *) @@ -1466,6 +1473,8 @@ let command_string ~env ~result_fmt ~oracle_fmt command = command.file (* deps: *) fin + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) fout cmd in @@ -1475,12 +1484,15 @@ let command_string ~env ~result_fmt ~oracle_fmt command = Format.fprintf result_fmt "(rule ; COMPARE TARGET #%d OF TEST #%d FOR TEST FILE %S\n \ (alias %s)\n \ + (enabled_if (and true %a))\n\ (action (diff %S %S))\n\ )@." (* rule: *) n command.nth command.file (* alias: *) (ptests_alias ~env) + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) (SubDir.make_file (SubDir.oracle_dir ~env) log) log @@ -1489,6 +1501,7 @@ let command_string ~env ~result_fmt ~oracle_fmt command = "(rule ; REPRODUCE TEST #%d OF TEST FILE %S\n \ (alias %S)\n \ (deps %a (universe))\n \ + (enabled_if (and true %a))\n\ (action (%s (system %S)))\n\ )@." (* rule: *) @@ -1497,6 +1510,8 @@ let command_string ~env ~result_fmt ~oracle_fmt command = (mk_alias command "exec") (* deps: *) pp_command_deps command + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) accepted_exit_code command_string @@ -1505,6 +1520,7 @@ let command_string ~env ~result_fmt ~oracle_fmt command = "(rule ; SHOW TEST COMMAND #%d OF TEST FILE %S\n \ (alias %S)\n \ (deps %a (universe))\n \ + (enabled_if (and true %a))\n\ (action (system %S))\n\ )@." (* rule: *) @@ -1513,6 +1529,8 @@ let command_string ~env ~result_fmt ~oracle_fmt command = (mk_alias command "exec.show") (* deps: *) pp_command_deps command (* to get an updated build even in case of using the result *) + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) ("echo '" ^ show_cmd wtest.cmd ^"'"); @@ -1521,20 +1539,26 @@ let command_string ~env ~result_fmt ~oracle_fmt command = Format.fprintf result_fmt "(rule\n \ (alias %S)\n \ + (enabled_if (and true %a))\n\ (action (diff %S %S))\n\ )@." (* alias: *) diff_alias + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) wtest.oracle_out reslog; Format.fprintf result_fmt "(rule\n \ (alias %S)\n \ + (enabled_if (and true %a))\n\ (action (diff %S %S))\n\ )@." (* alias: *) diff_alias + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps command.deps.load_plugin) (* action: *) wtest.oracle_err errlog; @@ -1659,6 +1683,7 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = (alias %s)\n \ (deps %a %a)\n \ (targets %a %a)\n \ + (enabled_if (and true %a))\n\ (action (run %s %%{dep:%s} %S))\n\ )@." (* rule: *) @@ -1671,6 +1696,8 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = (* targets: *) pp_list wtest.log pp_list wtest.bin + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps cmd.deps.load_plugin) (* action: *) !wrapper_cmd wrapper_basename @@ -1690,6 +1717,7 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = (alias %s)\n \ (deps (package frama-c)%a)\n \ (targets %a %a)\n \ + (enabled_if (and true %a))\n\ (action (system %S))\n\ )@." (* rule: *) @@ -1701,6 +1729,8 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = (* targets: *) pp_list wtest.log pp_list wtest.bin + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps cmd.deps.load_plugin) (* action: *) wtest.cmd end; @@ -1711,6 +1741,7 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = "(rule ; SHOW EXECNOW COMMAND #%d OF TEST FILE %S\n \ (alias %s)\n \ (deps %a (universe))\n \ + (enabled_if (and true %a))\n\ (action (system %S))\n\ )@." (* rule: *) @@ -1719,6 +1750,8 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = (mk_alias cmd "execnow.show") (* deps: *) pp_command_deps cmd (* to get an updated build even in case of using the result *) + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps cmd.deps.load_plugin) (* action: *) ("echo '" ^ show_cmd wtest.cmd ^"'"); ; @@ -1726,12 +1759,15 @@ let process_file ~env ~result_fmt ~oracle_fmt file directory config modules = Format.fprintf result_fmt "(rule ; COMPARE TARGET #%d OF EXECNOW #%d FOR TEST FILE %S\n \ (alias %s)\n \ + (enabled_if (and true %a))\n\ (action (diff %S %S))\n\ )@." (* rule: *) n nth file (* alias: *) (ptests_alias ~env) + (* enabled_if: *) + Fmt.(list (var_libavailable plugin_as_package )) (list_of_deps cmd.deps.load_plugin) (* action: *) (SubDir.make_file (SubDir.oracle_dir ~env) log) log