How to run aeternity test suites in local env

I am new to aeternity and I am learning the aeternity from the source codes in github.

I am able to run eunit tests in my local env now. I want to run the ct test, but I failed.

My Env is Windows 10 WSL + Docker.

Below are the steps I did.

  1. Pull the aeternity builder docker.
    docker pull aeternity/builder:latest

  2. Checkout aeternity source codes from github and checkout v6.3.0.
    git clone https://github.com/aeternity/aeternity.git git checkout v6.3.0

  3. Enter Docker
    docker run -it -v $(pwd):$(pwd) -w $(pwd) aeternity/builder:latest

  4. Test aecore_sync_SUITE
    make SOPHIA_NO_ACI=true CT_TEST_FLAGS=--suite=apps/aecore/test/aecore_sync_SUITE ct-latest

Error:


%%% aecore_sync_SUITE ==> all_nodes.two_nodes.start_first_node: FAILED
%%% aecore_sync_SUITE ==> {enoent,[{erlang,open_port,
[{spawn_executable,false},
[{env,[{“ERL_FLAGS”,
["-pa “,
“/mnt/d/git/aeternity/_build/test/lib/aecore/test”,
" -config ./default”]},
{“AETERNITY_CONFIG”,“data/aeternity.json”},
{“RUNNER_LOG_DIR”,“log”},
{“CODE_LOADING_MODE”,“interactive”}]},
exit_status,overlapped_io,stderr_to_stdout,hide,
{args,[“daemon”]},
{cd,"/mnt/d/git/aeternity/_build/test/logs/latest.sync/dev1"}]],
},
{aecore_suite_utils,cmd_run,6,
[{file,"/mnt/d/git/aeternity/apps/aecore/test/aecore_suite_utils.erl"},
{line,1027}]},
{aecore_suite_utils,cmd,6,
[{file,"/mnt/d/git/aeternity/apps/aecore/test/aecore_suite_utils.erl"},
{line,982}]},
{aecore_sync_SUITE,start_first_node,1,
[{file,"/mnt/d/git/aeternity/apps/aecore/test/aecore_sync_SUITE.erl"},
{line,409}]},
{test_server,ts_tc,3,[{file,“test_server.erl”},{line,1754}]},
{test_server,run_test_case_eval1,6,
[{file,“test_server.erl”},{line,1263}]},
{test_server,run_test_case_eval,9,
[{file,“test_server.erl”},{line,1195}]}]}


The node in the test suites doesn’t start correctly.

2 Likes

I tried with WSL2 and could not reproduce. Legacy WSL does have issues with networking and mounting windows volumes. I recommend you try with WSL2 and work with native volumes. Of course setup docker accordingly to use WSL2

7 Likes

@ivaylobadinov.chain Thanks for your reply.

What I used is WSL2, and inside WSL2, I started a docker whose image is from aeternity/builder:latest.
I start the docker’s interactive mode, I ran the test suites inside the docker.
I guess, it is not related to WSL2.

I tried to run it in WSL2(Ubuntu 20.04 with Erlang 22.3.4.9 installed), I still get the same error. It is wierd.

It turns out to be that I can’t use the mount drive. As @ivaylobadinov.chain mentioned, native volumes works.

4 Likes