From 84f8a97cad244546272a8c432b0e592af0101af8 Mon Sep 17 00:00:00 2001 From: Andrey Mokhov Date: Tue, 8 Sep 2020 19:03:31 +0100 Subject: [PATCH] Work around missing inline_tests_runner --- ppx_expect/negative-tests/dune | 26 ++++++++--------- ppx_inline_test/test/dune | 52 +++++++++++++++++----------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/ppx_expect/negative-tests/dune b/ppx_expect/negative-tests/dune index be66acf..8010802 100644 --- a/ppx_expect/negative-tests/dune +++ b/ppx_expect/negative-tests/dune @@ -1,19 +1,19 @@ (library (name expect_test_negative_tests) (libraries core) (preprocess (pps ppx_jane))) -(rule - (deps (:first_dep ./inline_tests_runner) ./inline_tests_runner.exe - (glob_files *.ml)) - (targets glob.ml.corrected exn.ml.corrected exn_missing.ml.corrected - exn_and_trailing.ml.corrected regexp.ml.corrected exact.ml.corrected - spacing.ml.corrected trailing.ml.corrected missing.ml.corrected - tag.ml.corrected string_padding.ml.corrected semicolon.ml.corrected - flexible.ml.corrected normal_strings.ml.corrected - pending_output.ml.corrected functor.ml.corrected - function_with_distinct_outputs.ml.corrected test-output) - (action - (bash - "rm -f *.ml.corrected 2>/dev/null; ! %{first_dep} -diff-cmd true -allow-output-patterns 2> test-output"))) +; (rule +; (deps (:first_dep ./inline_tests_runner) ./inline_tests_runner.exe +; (glob_files *.ml)) +; (targets glob.ml.corrected exn.ml.corrected exn_missing.ml.corrected +; exn_and_trailing.ml.corrected regexp.ml.corrected exact.ml.corrected +; spacing.ml.corrected trailing.ml.corrected missing.ml.corrected +; tag.ml.corrected string_padding.ml.corrected semicolon.ml.corrected +; flexible.ml.corrected normal_strings.ml.corrected +; pending_output.ml.corrected functor.ml.corrected +; function_with_distinct_outputs.ml.corrected test-output) +; (action +; (bash +; "rm -f *.ml.corrected 2>/dev/null; ! %{first_dep} -diff-cmd true -allow-output-patterns 2> test-output"))) (alias (name runtest) (deps exn.ml.corrected.expected exn.ml.corrected) (action (bash "diff -a %{deps}"))) diff --git a/ppx_inline_test/test/dune b/ppx_inline_test/test/dune index 674e4d8..3ec8cf2 100644 --- a/ppx_inline_test/test/dune +++ b/ppx_inline_test/test/dune @@ -5,32 +5,32 @@ file_without_test_module random_state) ((pps ppx_inline_test_drop) drop)))) -(rule (targets test.output test-partitions.output test-inlining.output) - (deps ./inline_tests_runner ./inline_tests_runner.exe) - (action - (bash - "\ - \nfunction run {\ - \n { OCAMLRUNPARAM=b=0 ./inline_tests_runner \"$@\" || echo code: $?; } |&\ - \n sed -r -e '/runtime.ml/ s/[0-9]+/XXX/g' -e 's/\\([0-9.]* sec\\)/(XXX sec)/'\ - \n}\ - \nrun > test.output\ - \n\ - \n(\ - \n export DONT_ASSUME_ALL_TESTS_RUN=\ - \n run -list-partitions | while read p; do\ - \n echo Test for partition $p:\ - \n run -partition $p\ - \n done\ - \n) > test-partitions.output\ - \n\ - \n(\ - \n export DONT_ASSUME_ALL_TESTS_RUN=\ - \n echo Partitions diff:\ - \n diff <(run -require-tag x-library-inlining-sensitive -list-partitions) <(run -list-partitions) || true\ - \n echo\ - \n run -require-tag x-library-inlining-sensitive -verbose\ - \n) > test-inlining.output"))) +; (rule (targets test.output test-partitions.output test-inlining.output) +; (deps ./inline_tests_runner ./inline_tests_runner.exe) +; (action +; (bash +; "\ +; \nfunction run {\ +; \n { OCAMLRUNPARAM=b=0 ./inline_tests_runner \"$@\" || echo code: $?; } |&\ +; \n sed -r -e '/runtime.ml/ s/[0-9]+/XXX/g' -e 's/\\([0-9.]* sec\\)/(XXX sec)/'\ +; \n}\ +; \nrun > test.output\ +; \n\ +; \n(\ +; \n export DONT_ASSUME_ALL_TESTS_RUN=\ +; \n run -list-partitions | while read p; do\ +; \n echo Test for partition $p:\ +; \n run -partition $p\ +; \n done\ +; \n) > test-partitions.output\ +; \n\ +; \n(\ +; \n export DONT_ASSUME_ALL_TESTS_RUN=\ +; \n echo Partitions diff:\ +; \n diff <(run -require-tag x-library-inlining-sensitive -list-partitions) <(run -list-partitions) || true\ +; \n echo\ +; \n run -require-tag x-library-inlining-sensitive -verbose\ +; \n) > test-inlining.output"))) (rule (targets diff-with-without-partitions) (deps ./test.output ./test-partitions.output)