Skip to content

Instantly share code, notes, and snippets.

@robertoaloi
Last active Dec 19, 2015
Embed
What would you like to do?
Potential issue with Erlang Common Test when ct:pal/X is called from a config callback module.
-module(my_config).
-export([read_config/1, check_parameter/1]).
read_config(Config) ->
ct:pal("pigeon!"),
{ok, Config}.
check_parameter(Config) ->
{ok, {config, Config}}.
$ erl
Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8] [async-threads:0] [kernel-poll:false]
Eshell V5.9.1 (abort with ^G)
1> test:do().
Common Test starting (cwd is /.../ct-bug)
----------------------------------------------------
2013-06-28 13:43:17.525
pigeon!
Common Test: Running make in test directories...
CWD set to: "/.../ct-bug/ct_run.nonode@nohost.2013-06-28_13.43.17"
TEST INFO: 1 test(s), 0 case(s) in 0 suite(s)
Testing *.ct-bug: Starting test, 0 test cases
Testing *.ct-bug: TEST COMPLETE, 0 ok, 0 failed of 0 test cases
Updating /.../ct-bug/index.html... done
Updating /.../ct-bug/all_runs.html... done
ok
$ erl
Erlang R15B03 (erts-5.9.3.1) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9.3.1 (abort with ^G)
1> test:do().
Common Test starting (cwd is /.../ct-bug)
-module(test).
-export([do/0]).
do() ->
ct:run_test([{dir, "."},
{userconfig, [{my_config, ""}]}]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment