From 1cbfa6875c4f00cae20a8c27e88b620c00a44665 Mon Sep 17 00:00:00 2001 From: Patrick Baudin <patrick.baudin@cea.fr> Date: Wed, 23 Feb 2022 14:18:18 +0100 Subject: [PATCH] [Tests] adds tests/syntax --- Makefile | 2 +- ptests/wtests.ml | 4 ++-- tests/ptests_config | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6d42d74082a..ea8622a26a6 100644 --- a/Makefile +++ b/Makefile @@ -206,7 +206,7 @@ clean-tests: purge-tests # Generates all dune files used for testing .PHONY: run-ptests -run-ptests: config.sed purge-tests +run-ptests: config.sed purge-tests ptests/ptests.exe ptests/wtests.exe $(PTESTS) $(TEST_DIRS) # run tests of for all configurations (requires all dune files) diff --git a/ptests/wtests.ml b/ptests/wtests.ml index 86a1ca9b351..40ccc005caa 100644 --- a/ptests/wtests.ml +++ b/ptests/wtests.ml @@ -40,7 +40,7 @@ end (* ------------------------------- *) let pp_json fmt json = - Format.fprintf fmt "%% dune build @@%s" json + Format.fprintf fmt "%% dune build @@%S" json let fail ~json s info = Format.printf "%a: Error - %s@.%% Aborting: %s@." pp_json json s info ; @@ -151,7 +151,7 @@ let compare_files ~json ~error~result oracle = let not_generated = not (Sys.file_exists result) in if not_generated then Format.printf "%a: missing target %S@." pp_json json result; - let cmd = Format.sprintf "%s %s %s" (if !verbosity > 0 then diff_cmd else cmp_cmd) oracle result in + let cmd = Format.sprintf "%s %S %S" (if !verbosity > 0 then diff_cmd else cmp_cmd) oracle result in if !verbosity > 0 then Format.printf "%% Run compare command: %s@." cmd; let ret_code = launch cmd in let is_ko = ret_code <> 0 in diff --git a/tests/ptests_config b/tests/ptests_config index c1497a20507..0773e60a66f 100644 --- a/tests/ptests_config +++ b/tests/ptests_config @@ -5,9 +5,9 @@ DEFAULT_SUITES= callgraph cil constant_propagation float idct impact # todo: -IGNORE= DEFAULT_SUITES= builtins compliance dynamic syntax +IGNORE= DEFAULT_SUITES= builtins compliance dynamic -DEFAULT_SUITES= occurrence pretty_printing rte_manual +DEFAULT_SUITES= occurrence pretty_printing rte_manual syntax # todo: IGNORE= DEFAULT_SUITES= journal libc metrics pdg rte -- GitLab