Created
March 1, 2023 18:44
-
-
Save erszcz/290cf16fb885f931797f58a14eda3da9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make -j10 tests | |
test/check_name_clashes.sh | |
mkdir -p "test_data" | |
erlc +debug_info -o test_data test/known_problems/should_fail/arith_op.erl test/known_problems/should_fail/exhaustive_argumentwise.erl test/known_problems/should_fail/exhaustive_map_variants.erl test/known_problems/should_fail/exhaustive_remote_map_variants.erl test/known_problems/should_fail/guard_should_fail.erl test/known_problems/should_fail/infer_any_pattern.erl test/known_problems/should_fail/intersection_with_any_should_fail.erl test/known_problems/should_fail/lambda_wrong_args.erl test/known_problems/should_fail/map_refinement_fancy.erl test/known_problems/should_fail/poly_lists_map_should_fail.erl test/known_problems/should_fail/refine_ty_vars.erl test/known_problems/should_fail/rigid_type_variables_fail.erl test/known_problems/should_fail/sample.erl test/known_problems/should_fail/tuple_union_arg.erl test/known_problems/should_pass/any_doesnt_have_type_none_should_pass.erl test/known_problems/should_pass/arith_op_arg_types.erl test/known_problems/should_pass/binary_exhaustiveness_checking_should_pass.erl test/known_problems/should_pass/error_in_guard.erl test/known_problems/should_pass/fun_subtyping.erl test/known_problems/should_pass/generator_var_shadow.erl test/known_problems/should_pass/intersection_with_any.erl test/known_problems/should_pass/lc_cannot_glb_different_variants.erl test/known_problems/should_pass/list_concat_op_should_pass.erl test/known_problems/should_pass/list_tail.erl test/known_problems/should_pass/map_union.erl test/known_problems/should_pass/map_update2.erl test/known_problems/should_pass/maybe_expr.erl test/known_problems/should_pass/poly_maps_get_with_default_should_pass.erl test/known_problems/should_pass/poly_should_pass.erl test/known_problems/should_pass/poly_type_vars.erl test/known_problems/should_pass/recursive_types.erl test/known_problems/should_pass/refine_bound_var_on_mismatch.erl test/known_problems/should_pass/refine_list_tail.erl test/should_fail/annotated_types_fail.erl test/should_fail/arg.erl test/should_fail/arith_op_fail.erl test/should_fail/arity_mismatch.erl test/should_fail/bc_fail.erl test/should_fail/bin_expression.erl test/should_fail/bin_type_error.erl test/should_fail/branch.erl test/should_fail/branch2.erl test/should_fail/call.erl test/should_fail/call_intersection_function_with_union_arg_fail.erl test/should_fail/case_pattern.erl test/should_fail/case_pattern2.erl test/should_fail/catch_expr_fail.erl test/should_fail/cons.erl test/should_fail/covariant_map_keys_fail.erl test/should_fail/cyclic_type_vars.erl test/should_fail/depth.erl test/should_fail/exhaustive.erl test/should_fail/exhaustive_float.erl test/should_fail/exhaustive_list_variants.erl test/should_fail/exhaustive_refinable_map_variants.erl test/should_fail/exhaustive_remote_user_type.erl test/should_fail/exhaustive_string_variants.erl test/should_fail/exhaustive_type.erl test/should_fail/exhaustive_user_type.erl test/should_fail/exhaustiveness_check_toggling.erl test/should_fail/generator.erl test/should_fail/guard_fail.erl test/should_fail/imported_undef.erl test/should_fail/infer_enabled.erl test/should_fail/intersection_check.erl test/should_fail/intersection_fail.erl test/should_fail/intersection_infer.erl test/should_fail/intersection_with_any_fail.erl test/should_fail/iodata_fail.erl test/should_fail/lambda_not_fun.erl test/should_fail/lc_generator_should_fail.erl test/should_fail/lc_not_list.erl test/should_fail/list_infer_fail.erl test/should_fail/list_op.erl test/should_fail/list_op_should_fail.erl test/should_fail/list_union_fail.erl test/should_fail/lists_map_nonempty_fail.erl test/should_fail/literal_char.erl test/should_fail/literal_patterns.erl test/should_fail/logic_op.erl test/should_fail/map_entry.erl test/should_fail/map_fail.erl test/should_fail/map_failing_expr.erl test/should_fail/map_failing_subtyping.erl test/should_fail/map_field_invalid_update.erl test/should_fail/map_literal.erl test/should_fail/map_pattern_fail.erl test/should_fail/map_refinement_fail.erl test/should_fail/map_type_error.erl test/should_fail/match.erl test/should_fail/messaging_fail.erl test/should_fail/module_info_fail.erl test/should_fail/named_fun_fail.erl test/should_fail/named_fun_infer_fail.erl test/should_fail/nil.erl test/should_fail/no_idempotent_xor.erl test/should_fail/non_neg_plus_pos_is_pos_fail.erl test/should_fail/nonempty_list_match_in_head_nonexhaustive.erl test/should_fail/nonempty_string_fail.erl test/should_fail/opaque_fail.erl test/should_fail/operator_pattern_fail.erl test/should_fail/pattern.erl test/should_fail/pattern_record_fail.erl test/should_fail/poly_fail.erl test/should_fail/poly_lists_map_fail.erl test/should_fail/poly_map_type_var_should_fail.erl test/should_fail/poly_union_lower_bound_fail.erl test/should_fail/pp_intersection.erl test/should_fail/record.erl test/should_fail/record_exhaustive.erl test/should_fail/record_field.erl test/should_fail/record_index.erl test/should_fail/record_info_fail.erl test/should_fail/record_refinement_fail.erl test/should_fail/record_update.erl test/should_fail/record_wildcard_fail.erl test/should_fail/recursive_type_fail.erl test/should_fail/recursive_types_failing.erl test/should_fail/rel_op.erl test/should_fail/return_fun_fail.erl test/should_fail/send_fail.erl test/should_fail/shortcut_ops_fail.erl test/should_fail/spec_and_fun_clause_intersection_fail.erl test/should_fail/string_literal.erl test/should_fail/tuple_union_fail.erl test/should_fail/tuple_union_pattern.erl test/should_fail/tuple_union_refinement.erl test/should_fail/type_refinement_fail.erl test/should_fail/unary_op.erl test/should_fail/unary_plus_fail.erl test/should_fail/union_with_any.erl test/should_fail/unreachable_after_refinement.erl test/should_pass/alias_in_pattern.erl test/should_pass/andalso_any.erl test/should_pass/ann_types.erl test/should_pass/annotated_types.erl test/should_pass/any.erl test/should_pass/any_pattern.erl test/should_pass/bc_pass.erl test/should_pass/binary_exhaustiveness_checking.erl test/should_pass/binary_literal_pattern.erl test/should_pass/bitstring.erl test/should_pass/block_scope.erl test/should_pass/bool.erl test/should_pass/bounded_funs.erl test/should_pass/call_intersection_function_with_union_arg_pass.erl test/should_pass/case.erl test/should_pass/case_of_record_with_user_defined.erl test/should_pass/catch_expr_pass.erl test/should_pass/covariant_map_keys_pass.erl test/should_pass/cyclic_otp_specs.erl test/should_pass/erlang_error_args_none_pass.erl test/should_pass/exhaustiveness_union_types.erl test/should_pass/factorial.erl test/should_pass/float.erl test/should_pass/flow.erl test/should_pass/fun_capture.erl test/should_pass/fun_spec.erl test/should_pass/guard.erl test/should_pass/if_expr.erl test/should_pass/imported.erl test/should_pass/int.erl test/should_pass/intersection.erl test/should_pass/intersection_pass.erl test/should_pass/intersection_with_any_pass.erl test/should_pass/iodata.erl test/should_pass/issue131.erl test/should_pass/lc.erl test/should_pass/lc_generator_not_none.erl test/should_pass/lc_var_binds_in_filters.erl test/should_pass/list.erl test/should_pass/list_concat_op_pass.erl test/should_pass/list_exhaustiveness_checking_regressions.erl test/should_pass/list_exhaustiveness_checking_regressions2.erl test/should_pass/list_exhaustiveness_checking_unreachable_clause_regression.erl test/should_pass/list_infer_pass.erl test/should_pass/listsspecs.erl test/should_pass/map.erl test/should_pass/map_as_argument_update.erl test/should_pass/map_creation.erl test/should_pass/map_field_valid_update.erl test/should_pass/map_infer_pass.erl test/should_pass/map_passing_expr.erl test/should_pass/map_passing_subtyping.erl test/should_pass/map_pattern.erl test/should_pass/map_refinement.erl test/should_pass/map_update1.erl test/should_pass/map_update_with_record_field.erl test/should_pass/messaging_pass.erl test/should_pass/minimised_gradualizer_fmt.erl test/should_pass/minus.erl test/should_pass/module_info.erl test/should_pass/named_fun_infer_pass.erl test/should_pass/named_fun_pass.erl test/should_pass/negate_none.erl test/should_pass/nested_pattern_match.erl test/should_pass/non_neg_plus_pos_is_pos_pass.erl test/should_pass/nonempty_cons.erl test/should_pass/nonempty_list_match_in_head_exhaustive.erl test/should_pass/nonempty_string.erl test/should_pass/nonexhaustive_record_pattern.erl test/should_pass/opaque.erl test/should_pass/operator_pattern_pass.erl test/should_pass/operator_subtypes.erl test/should_pass/other_module.erl test/should_pass/pattern_bind_reuse.erl test/should_pass/pattern_record.erl test/should_pass/pattern_with_ty_vars.erl test/should_pass/poly_lists_map_constraints_pass.erl test/should_pass/poly_lists_map_pass.erl test/should_pass/poly_map_pattern.erl test/should_pass/poly_pass.erl test/should_pass/poly_union_lower_bound_pass.erl test/should_pass/preludes.erl test/should_pass/qlc_test.erl test/should_pass/record_info.erl test/should_pass/record_refinement.erl test/should_pass/record_union_pass.erl test/should_pass/record_union_with_any_should_pass.erl test/should_pass/record_var.erl test/should_pass/record_wildcard_pass.erl test/should_pass/record_with_user_defined.erl test/should_pass/records.erl test/should_pass/recursive_call_with_remote_union_return_type_pass.erl test/should_pass/recursive_types_passing.erl test/should_pass/refine_comparison.erl test/should_pass/refine_mismatch_using_guard_bifs.erl test/should_pass/remote_types.erl test/should_pass/remote_types_pass.erl test/should_pass/return_fun.erl test/should_pass/rigid_type_variables_pass.erl test/should_pass/scope.erl test/should_pass/send_pass.erl test/should_pass/sets_set.erl test/should_pass/shortcut_ops_pass.erl test/should_pass/spec_and_fun_clause_intersection_pass.erl test/should_pass/stuff_as_top.erl test/should_pass/try.erl test/should_pass/tuple.erl test/should_pass/tuple_union_pass.erl test/should_pass/tuple_union_pat.erl test/should_pass/tuple_union_pattern_pass.erl test/should_pass/type_decl.erl test/should_pass/type_pattern.erl test/should_pass/type_refinement_pass.erl test/should_pass/type_variable.erl test/should_pass/type_vars_term.erl test/should_pass/typed_record_field_access.erl test/should_pass/unary_negate_union_with_user_type_pass.erl test/should_pass/unary_plus.erl test/should_pass/underscore.erl test/should_pass/user_type_in_pattern_body.erl test/should_pass/user_types.erl test/should_pass/var.erl test/should_pass/var_fun.erl test/should_pass/varbind_in_block.erl test/should_pass/varbind_in_case.erl test/should_pass/varbind_in_function_head.erl test/should_pass/varbind_in_lc.erl test/should_pass/variable_binding.erl test/should_pass/variable_binding_leaks.erl | |
erl -enable-feature maybe_expr -noinput -pa ebin -pa test -eval \ | |
'case eunit:test("test", []) of ok -> ok; error -> halt(2) end, halt().' | |
# CLI test cases | |
# 1. When checking a dir with erl files, erl file names are printed | |
bin/gradualizer test/dir \ | |
2>&1|perl -0777 -ne 'm%^test/dir/test_in_dir.erl:% or die "CLI 1 ($_)"' | |
=INFO REPORT==== 1-Mar-2023::19:33:55.089735 === | |
application: syntax_tools | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:55.095558 === | |
application: gradualizer | |
exited: stopped | |
type: temporary | |
# 2. When checking a beam file; beam file name is printed | |
bin/gradualizer test/arg.beam \ | |
2>&1|perl -0777 -ne 'm%^test/arg.beam:% or die "CLI 1 ($_)"' | |
=INFO REPORT==== 1-Mar-2023::19:33:55.385709 === | |
application: syntax_tools | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:55.386139 === | |
application: gradualizer | |
exited: stopped | |
type: temporary | |
test/known_problems/should_fail/refine_ty_vars.erl:11:19: Warning: this clause cannot match because a previous clause at line 10 always matches | |
% 11| ({a, a}) -> true; %% can never match | |
% | ^ | |
test/known_problems/should_pass/any_doesnt_have_type_none_should_pass.erl:15:3: Warning: variable 'Ty1' is unused | |
% 15| f(Ty1 = {type, _, tuple, Tys1}, Ty2 = {type, _, tuple, Tys2}) -> | |
% | ^ | |
test/known_problems/should_pass/any_doesnt_have_type_none_should_pass.erl:15:33: Warning: variable 'Ty2' is unused | |
% 15| f(Ty1 = {type, _, tuple, Tys1}, Ty2 = {type, _, tuple, Tys2}) -> | |
% | ^ | |
test/should_fail/infer_enabled.erl:8:7: Warning: evaluation of operator '+'/2 will fail with a 'badarith' exception | |
% 8| X + Y. | |
% | ^ | |
test/should_fail/list_op_should_fail.erl:12:11: Warning: evaluation of operator '++'/2 will fail with a 'badarg' exception | |
% 12| [a|b] ++ c. | |
% | ^ | |
test/should_fail/list_op_should_fail.erl:16:5: Warning: evaluation of operator '++'/2 will fail with a 'badarg' exception | |
% 16| erlang:'++'([a|b], c). | |
% | ^ | |
test/should_fail/list_op_should_fail.erl:20:11: Warning: evaluation of operator '++'/2 will fail with a 'badarg' exception | |
% 20| [a|b] ++ [c]. | |
% | ^ | |
test/should_fail/list_op_should_fail.erl:24:5: Warning: evaluation of operator '++'/2 will fail with a 'badarg' exception | |
% 24| erlang:'++'([a|b], [c]). | |
% | ^ | |
test/should_fail/record_refinement_fail.erl:13:1: Warning: this clause for one_field2/2 cannot match because a previous clause at line 12 always matches | |
% 13| one_field2(_, I) -> I. | |
% | ^ | |
test/should_fail/recursive_type_fail.erl:16:1: Warning: function f/0 is unused | |
% 16| f() -> | |
% | ^ | |
test/should_fail/recursive_type_fail.erl:24:1: Warning: function i/0 is unused | |
% 24| i() -> | |
% | ^ | |
test/should_fail/recursive_type_fail.erl:32:1: Warning: function l/0 is unused | |
% 32| l() -> | |
% | ^ | |
test/should_fail/unreachable_after_refinement.erl:8:1: Warning: this clause cannot match because a previous clause at line 6 always matches | |
% 8| unreachable(a) -> ok. %% <-- shouldn't happen.... | |
% | ^ | |
# 3. Brief formatting | |
bin/gradualizer --fmt_location brief test/dir \ | |
2>&1|perl -0777 -ne '/^test\/dir\/test_in_dir.erl:6:12: The variable/ or die "CLI 6 ($_)"' | |
test/should_pass/call_intersection_function_with_union_arg_pass.erl:33:2: Warning: type t() is unused | |
% 33| -type t() :: t1 | t2. | |
% | ^ | |
test/should_pass/call_intersection_function_with_union_arg_pass.erl:34:2: Warning: type u() is unused | |
% 34| -type u() :: u1 | u2. | |
% | ^ | |
=INFO REPORT==== 1-Mar-2023::19:33:56.141763 === | |
application: syntax_tools | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:56.144654 === | |
application: gradualizer | |
exited: stopped | |
type: temporary | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:7:4: Warning: variable 'Cs' is unused | |
% 7| i([Cs]) -> ok; | |
% | ^ | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:8:4: Warning: variable 'C1' is unused | |
% 8| i([C1, C2 | Cs]) -> ok. | |
% | ^ | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:8:8: Warning: variable 'C2' is unused | |
% 8| i([C1, C2 | Cs]) -> ok. | |
% | ^ | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:8:13: Warning: variable 'Cs' is unused | |
% 8| i([C1, C2 | Cs]) -> ok. | |
% | ^ | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:12:4: Warning: variable 'C1' is unused | |
% 12| j([C1, C2 | _]) -> 2; | |
% | ^ | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:12:8: Warning: variable 'C2' is unused | |
% 12| j([C1, C2 | _]) -> 2; | |
% | ^ | |
test/should_pass/list_exhaustiveness_checking_regressions2.erl:13:4: Warning: variable 'Cs' is unused | |
% 13| j([Cs]) -> 3. | |
% | ^ | |
test/should_pass/non_neg_plus_pos_is_pos_pass.erl:10:1: Warning: function g/1 is unused | |
% 10| g(N) -> | |
% | ^ | |
test/should_pass/operator_pattern_pass.erl:46:1: Warning: this clause cannot match because a previous clause at line 43 always matches | |
% 46| i1(-4) -> {}; | |
% | ^ | |
test/should_pass/operator_pattern_pass.erl:53:1: Warning: this clause cannot match because a previous clause at line 50 always matches | |
% 53| i2(-4) -> {}; | |
% | ^ | |
=INFO REPORT==== 1-Mar-2023::19:33:56.378655 === | |
application: syntax_tools | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:56.379032 === | |
application: gradualizer | |
exited: stopped | |
type: temporary | |
test/should_pass/records.erl:67:21: Warning: variable 'R' is unused | |
% 67| f(#rec_any{f = F} = R) -> F. | |
% | ^ | |
gradualizer_tests:9: type_check_erl_file_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer_tests:'-type_check_erl_file_test_/0-fun-1-'/0 (test/gradualizer_tests.erl, line 9) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_pass/any.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
test/should_pass/remote_types.erl:13:2: Warning: opaque type my_opaque() is not exported | |
% 13| -opaque my_opaque() :: remote_types. | |
% | ^ | |
gradualizer_tests:10: type_check_erl_file_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer_tests:'-type_check_erl_file_test_/0-fun-3-'/0 (test/gradualizer_tests.erl, line 10) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_pass/any.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
test/should_pass/remote_types_pass.erl:6:1: Warning: function f/1 is unused | |
% 6| f(Opts) -> | |
% | ^ | |
test/should_pass/remote_types_pass.erl:11:1: Warning: function g/1 is unused | |
% 11| g(_Opts) -> ok. | |
% | ^ | |
test/should_pass/remote_types_pass.erl:14:1: Warning: function h/0 is unused | |
% 14| h() -> []. | |
% | ^ | |
gradualizer_tests:11: type_check_erl_file_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer_tests:'-type_check_erl_file_test_/0-fun-5-'/0 (test/gradualizer_tests.erl, line 11) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_fail/arg.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:12: type_check_erl_file_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer_tests:'-type_check_erl_file_test_/0-fun-7-'/0 (test/gradualizer_tests.erl, line 12) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_fail/arg.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:17: type_check_erl_files_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-1-'/4 (src/gradualizer.erl, line 273) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:'-type_check_erl_files_test_/0-fun-1-'/0 (test/gradualizer_tests.erl, line 17) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_pass/any.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:18: type_check_erl_files_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-1-'/4 (src/gradualizer.erl, line 273) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:'-type_check_erl_files_test_/0-fun-3-'/0 (test/gradualizer_tests.erl, line 18) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_fail/arg.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:19: type_check_erl_files_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-1-'/4 (src/gradualizer.erl, line 273) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:'-type_check_erl_files_test_/0-fun-5-'/0 (test/gradualizer_tests.erl, line 19) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_fail/arg.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:21: type_check_erl_files_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-0-'/4 (src/gradualizer.erl, line 265) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:'-type_check_erl_files_test_/0-fun-7-'/0 (test/gradualizer_tests.erl, line 21) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_fail/arg.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:22: type_check_erl_files_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-0-'/4 (src/gradualizer.erl, line 265) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:'-type_check_erl_files_test_/0-fun-9-'/0 (test/gradualizer_tests.erl, line 22) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_fail/arg.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:24: type_check_erl_files_test_...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-0-'/4 (src/gradualizer.erl, line 265) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:'-type_check_erl_files_test_/0-fun-11-'/0 (test/gradualizer_tests.erl, line 24) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/should_pass/any.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests: type_check_module_test...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 180) | |
in call from gradualizer_tests:type_check_module_test/0 (test/gradualizer_tests.erl, line 43) | |
in call from eunit_test:'-mf_wrapper/2-fun-0-'/2 (eunit_test.erl, line 273) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
**exit:{noproc, | |
{gen_server,call, | |
[gradualizer_db, | |
{import_beam_files, | |
["/Users/erszcz/work/erszcz/gradualizer/test/any.beam"]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests: type_check_dir_test...*failed* | |
in function gen_server:call/3 (gen_server.erl, line 247) | |
in call from gradualizer:type_check_file/2 (src/gradualizer.erl, line 171) | |
in call from gradualizer:'-type_check_files/2-fun-1-'/4 (src/gradualizer.erl, line 273) | |
in call from lists:foldl/3 (lists.erl, line 1267) | |
in call from gradualizer_tests:type_check_dir_test/0 (test/gradualizer_tests.erl, line 46) | |
in call from eunit_test:'-mf_wrapper/2-fun-0-'/2 (eunit_test.erl, line 273) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
**exit:{noproc,{gen_server,call, | |
[gradualizer_db, | |
{import_erl_files,["test/dir/test_in_dir.erl"],[]}, | |
infinity]}} | |
output:<<"">> | |
gradualizer_tests:50: not_found_test_...*failed* | |
in function gradualizer_tests:'-not_found_test_/0-fun-1-'/0 (test/gradualizer_tests.erl, line 50) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 346) | |
in call from eunit_proc:run_group/2 (eunit_proc.erl, line 570) | |
**error:{assertException, | |
[{module,gradualizer_tests}, | |
{line,50}, | |
{expression,"gradualizer : type_check_file ( \"test/not_found.erl\" )"}, | |
{pattern, | |
"{ throw , { file_not_found , \"test/not_found.erl\" } , [...] }"}, | |
{unexpected_exception, | |
{exit, | |
{noproc, | |
{gen_server,call, | |
[gradualizer_db,{import_erl_files,...},infinity]}}, | |
[{gen_server,call,3,[{file,...},{...}]}, | |
{gradualizer,type_check_file,2,[{...}|...]}, | |
{gradualizer_tests,'-not_found_test_/0-fun-1-',0,[...]}, | |
{eunit_test,run_testfun,1,...}, | |
{eunit_proc,run_test,...}, | |
{eunit_proc,...}, | |
{...}|...]}}]} | |
output:<<"">> | |
gradualizer_tests:52: not_found_test_...*failed* | |
in function gradualizer_tests:'-not_found_test_/0-fun-3-'/0 (test/gradualizer_tests.erl, line 52) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 346) | |
in call from eunit_proc:run_group/2 (eunit_proc.erl, line 570) | |
**error:{assertException, | |
[{module,gradualizer_tests}, | |
{line,52}, | |
{expression,"gradualizer : type_check_file ( \"test/not_found.beam\" )"}, | |
{pattern, | |
"{ throw , { file_not_found , \"test/not_found.beam\" } , [...] }"}, | |
{unexpected_exception, | |
{exit, | |
{noproc, | |
{gen_server,call, | |
[gradualizer_db,{import_beam_files,...},infinity]}}, | |
[{gen_server,call,3,[{file,...},{...}]}, | |
{gradualizer,type_check_file,2,[{...}|...]}, | |
{gradualizer_tests,'-not_found_test_/0-fun-3-',0,[...]}, | |
{eunit_test,run_testfun,1,...}, | |
{eunit_proc,run_test,...}, | |
{eunit_proc,...}, | |
{...}|...]}}]} | |
output:<<"">> | |
gradualizer_tests:68: bad_content_test_...*failed* | |
in function gradualizer_tests:'-bad_content_test_/0-fun-1-'/0 (test/gradualizer_tests.erl, line 68) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 346) | |
in call from eunit_proc:run_group/2 (eunit_proc.erl, line 570) | |
**error:{assertException, | |
[{module,gradualizer_tests}, | |
{line,68}, | |
{expression, | |
"gradualizer : type_check_file ( \"test/bad_content.beam\" )"}, | |
{pattern, | |
"{ throw , { forms_error , { not_a_beam_file , 'test/bad_content.beam' } } , [...] }"}, | |
{unexpected_exception, | |
{exit, | |
{noproc, | |
{gen_server,call, | |
[gradualizer_db,{import_beam_files,...},infinity]}}, | |
[{gen_server,call,3,[{file,...},{...}]}, | |
{gradualizer,type_check_file,2,[{...}|...]}, | |
{gradualizer_tests,'-bad_content_test_/0-fun-1-',0,[...]}, | |
{eunit_test,run_testfun,1,...}, | |
{eunit_proc,run_test,...}, | |
{eunit_proc,...}, | |
{...}|...]}}]} | |
output:<<"">> | |
test/should_pass/typed_record_field_access.erl:8:1: Warning: function b/1 is unused | |
% 8| b(R) -> | |
% | ^ | |
test/should_pass/unary_negate_union_with_user_type_pass.erl:6:1: Warning: function price/1 is unused | |
% 6| price(_) -> 100. | |
% | ^ | |
test/should_pass/unary_negate_union_with_user_type_pass.erl:9:1: Warning: function f/2 is unused | |
% 9| f(G, ReversePaymentG) -> | |
% | ^ | |
gradualizer_tests:78: beam_without_forms_test_...*failed* | |
in function gradualizer_tests:'-beam_without_forms_test_/0-fun-1-'/0 (test/gradualizer_tests.erl, line 78) | |
in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71) | |
in call from eunit_proc:run_test/1 (eunit_proc.erl, line 531) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 356) | |
in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 514) | |
in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 456) | |
in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 346) | |
in call from eunit_proc:run_group/2 (eunit_proc.erl, line 570) | |
**error:{assertException, | |
[{module,gradualizer_tests}, | |
{line,78}, | |
{expression, | |
"gradualizer : type_check_file ( \"test/should_pass/any.beam\" )"}, | |
{pattern, | |
"{ throw , { forms_not_found , \"test/should_pass/any.beam\" } , [...] }"}, | |
{unexpected_exception, | |
{exit, | |
{noproc, | |
{gen_server,call, | |
[gradualizer_db,{import_beam_files,...},infinity]}}, | |
[{gen_server,call,3,[{file,...},{...}]}, | |
{gradualizer,type_check_file,2,[{...}|...]}, | |
{gradualizer_tests,'-beam_without_forms_test_/0-fun-1-',0,[...]}, | |
{eunit_test,run_testfun,1,...}, | |
{eunit_proc,run_test,...}, | |
{eunit_proc,...}, | |
{...}|...]}}]} | |
output:<<"">> | |
# 4. Verbose formatting | |
bin/gradualizer --fmt_location verbose --no_fancy test/dir \ | |
2>&1|perl -ne '/^test\/dir\/test_in_dir.erl: The variable N on line 6 at column 12/ or die "CLI 7 ($_)"' | |
# 5. Possible to exclude prelude (-0777 from https://stackoverflow.com/a/30594643/497116) | |
bin/gradualizer --no_prelude test/should_pass/cyclic_otp_specs.erl \ | |
2>&1|perl -0777 -ne '/^test\/should_pass\/cyclic_otp_specs.erl: The type spec/g or die "CLI 9 ($_)"' | |
# 6. Excluding prelude and then including it is a no-op | |
bin/gradualizer --no_prelude --specs_override_dir priv/prelude \ | |
test/should_pass/cyclic_otp_specs.erl || (echo "CLI 10"; exit 1) | |
=INFO REPORT==== 1-Mar-2023::19:33:59.175784 === | |
application: syntax_tools | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:59.179149 === | |
application: gradualizer | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:59.229750 === | |
application: syntax_tools | |
exited: stopped | |
type: temporary | |
=INFO REPORT==== 1-Mar-2023::19:33:59.230666 === | |
application: gradualizer | |
exited: stopped | |
type: temporary | |
======================================================= | |
Failed: 16. Skipped: 0. Passed: 632. | |
make: *** [eunit] Error 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment