-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
30 lines (21 loc) · 902 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
A simple OTP application to test out some of OTP's features
The s_server module is a gen_server which will respond with pong when it receives a ping
To run the application, start erlang shell with:
erl -pa ebin
and in the shell enter
1> application:start(s_server).
ok
2> s_server:ping().
pong
You can enter the shell command regs(). to get a list of all registered processes which will include s_server and s_server_sup
%% Running tests
To test the s_server use rebar from the command line
./rebar eunit
%% Analyse using dialyzer
export ERL_TOP=~/Packages/otp
% Create persistent lookup table from the relevant OTP applications
dialyzer --build_plt -r . $ERL_TOP/lib/stdlib/ebin $ERL_TOP/lib/kernel/ebin $ERL_TOP/lib/eunit/ebin
% create PLT from my own code and output it to s_server.plt
dialyzer --add_to_plt -r . --output_plt s_server.plt
# do the analysis
dialyzer --plt s_server.plt -r .