File 0915-Simplify-ct_property_test-result-handling.patch of Package erlang
From fee7abe17835eecf6bec0b4880a4b69c8edd7fba Mon Sep 17 00:00:00 2001
From: Maria Scott <maria-12648430@hnc-agency.org>
Date: Fri, 17 Nov 2023 09:24:11 +0100
Subject: [PATCH 2/2] Simplify ct_property_test result handling
---
lib/common_test/src/ct_property_test.erl | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/lib/common_test/src/ct_property_test.erl b/lib/common_test/src/ct_property_test.erl
index 8271e9d6d0..3a350c579e 100644
--- a/lib/common_test/src/ct_property_test.erl
+++ b/lib/common_test/src/ct_property_test.erl
@@ -98,7 +98,7 @@ init_tool_extensions(_) ->
quickcheck(Property, Config) ->
Tool = proplists:get_value(property_test_tool,Config),
F = function_name(quickcheck, Tool),
- mk_ct_return( Tool:F(Property), Tool ).
+ mk_ct_return(Tool:F(Property)).
%%%----------------------------------------------------------------
@@ -162,20 +162,10 @@ print_frequency_ranges(Options0) ->
%%%
%%% Make return values back to the calling Common Test suite
-mk_ct_return(true, _Tool) ->
+mk_ct_return(true) ->
true;
-mk_ct_return(Other, Tool) ->
- case Tool:counterexample() of
- [[_|_]=CE|_] ->
- case lists:last(CE) of
- {set, {var, _}, {call, M, F, Args}} ->
- {fail, io_lib:format("~p:~tp/~p returned bad result", [M, F, length(Args)])};
- _ ->
- {fail, Other}
- end;
- _ ->
- {fail, Other}
- end.
+mk_ct_return(Other) ->
+ {fail, Other}.
%%% Check if a property testing tool is found
which_module_exists([Module|Modules]) ->
--
2.35.3