mirror of
https://github.com/zap-proto/erlang.git
synced 2026-10-30 15:05:14 +00:00
Build the ezap Erlang binding with rebar3 and run it green on modern OTP.
rebar.config: test-profile deps proper 1.5.0 + meck 1.2.0 (meck 1.0.0 fails
to compile on OTP 29 — legacy `catch` is now an error), CT dir test/.
.github/workflows/ci.yml: push-to-main + PR + workflow_dispatch, OTP 26/27
matrix via erlef/setup-beam, runs `rebar3 compile/eunit/ct`.
src/schema_zap.erl, test/test_zap.erl: strip fossil `-type({{record,_},...})`
attributes. Pre-OTP-27 epp split typed records into a separate record-type
attr with bare-integer annotations; OTP 29 erl_lint crashes on these
(erl_anno violation). Modern epp emits typed -record forms directly, so these
attrs are dead weight; the -record decls already carry the fields.
test isolation: ezap_promise_sup / ezap_capability_sup are locally registered,
but teardown used exit(Pid, normal) — a no-op against an exit-trapping
supervisor — leaking the registered name and failing the next test with
{already_started,_}. Add ezap_test_utils:stop_sup/1 (unlink+monitor+kill+wait)
and use it everywhere; thirdCap_test_/basicCap_test_ now start and stop their
own promise supervisor instead of relying on a leak from a prior test.
bin/run_test: erlang:get_stacktrace/0 (removed in OTP 24) -> Class:Error:Stack.
20 lines
308 B
Erlang
20 lines
308 B
Erlang
%% -*- mode: erlang -*-
|
|
{erl_opts, [debug_info]}.
|
|
|
|
{deps, []}.
|
|
|
|
{profiles,
|
|
[{test,
|
|
[{deps,
|
|
[{proper, "1.5.0"},
|
|
{meck, "1.2.0"}]},
|
|
{erl_opts, [debug_info, {d, 'TEST'}]}]}]}.
|
|
|
|
{ct_opts, [{dir, "test"}]}.
|
|
|
|
{eunit_opts, [verbose]}.
|
|
|
|
{cover_enabled, true}.
|
|
|
|
{dialyzer, [{plt_apps, all_deps}]}.
|