erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
696 stars 233 forks source link

https://erlanger.slack.com/archives/C055DJA49/p1703153178619079 #932

Closed Ahzed11 closed 8 months ago

Ahzed11 commented 8 months ago

Sorry for the name used for the issue. I did not know how to call it.

Here is the output for the commands you told me to do:

$ rebar3 as prod release
===> Fetching rebar3_appup_plugin (from {git,"https://github.com/lrascao/rebar3_appup_plugin",
                               {branch,"develop"}})
===> Fetching bbmustache v1.5.0
===> Fetching string_compat v0.0.1
===> Analyzing applications...
===> Compiling string_compat
===> Compiling bbmustache
===> Compiling rebar3_appup_plugin
===> No entry for profile prod in config.
===> Verifying dependencies...
===> Fetching cowboy (from {git,"https://github.com/ninenines/cowboy.git",
                  {ref,"9e600f6c1df3c440bc196b66ebbc005d70107217"}})
===> Fetching gproc (from {git,"https://github.com/uwiger/gproc.git",
                 {ref,"4ca45e0a97722a418a31eb1753f4e3b953f7fb1d"}})
===> Fetching gun (from {git,"https://github.com/ninenines/gun.git",
               {ref,"db0655def7d113f5aa168a1653df5d62245d3502"}})
===> Fetching cowlib (from {git,"https://github.com/ninenines/cowlib",
                  {ref,"cc04201c1d0e1d5603cd1cde037ab729b192634c"}})
===> Fetching ranch (from {git,"https://github.com/ninenines/ranch",
                 {ref,"a692f44567034dacf5efcaa24a24183788594eb7"}})
===> Analyzing applications...
===> Compiling cowlib
===> Compiling gun
===> Compiling ranch
===> Compiling cowboy
===> Compiling gproc
===> Analyzing applications...
===> Compiling pixelwar
===> Assembling release pixelwar-0.2.0...
===> Release successfully assembled: _build/prod/rel/pixelwar

In this case, there is a level of indirection because my script calls a ct test but it also does not work when calling the function directly in the script.

$ ./_build/prod/rel/pixelwar/bin/pixelwar-0.2.0 escript ../../../../apps/pixelwar/test/pixelwar_launch_test "0.1.0" "0.2.0"

Common Test starting (cwd is /home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar)

Common Test: Running make in test directories...
{error,{invalid_directory,"/home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/apps/pixelwar/test"}}
{error,{invalid_directory,"/home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/apps/pixelwar/test"}}

Updating /home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar/results/all_runs.html ... done
escript: exception error: no match of right hand side value {error,
                                                    {error,
                                                     {invalid_directory,
                                                      "/home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/apps/pixelwar/test"}}}
  in function  pixelwar_launch_test:main/1 (/home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar/../../../../apps/pixelwar/test/pixelwar_launch_test, line 11)
  in call from escript:run/2 (escript.erl, line 750)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_em/1 
  in call from init:do_boot/3 
ahzed11@pop-os:~/ssd/Code/Erlang/pw/erlang$ ./_build/prod/rel/pixelwar/bin/pixelwar-0.2.0 escript ../../../../apps/pixelwar/test/pixelwar_launch_test "0.1.0" "0.2.0"

Common Test starting (cwd is /home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar)

Common Test: Running make in test directories...

CWD set to: "/home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar/results/ct_run.nonode@nohost.2023-12-21_13.16.45"

TEST INFO: 1 test(s), 3 case(s) in 0 suite(s)

Testing apps.pixelwar.0_1_0_to_0_2_0: Starting test, 3 test cases

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
pixelwar_matrix_serv:set_element failed
Reason: {undef,[{pixelwar_matrix_serv,...},{...}|...]}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Testing apps.pixelwar.0_1_0_to_0_2_0: *** FAILED test case 1 of 3 ***
Testing apps.pixelwar.0_1_0_to_0_2_0: TEST COMPLETE, 0 ok, 1 failed, 2 skipped of 3 test cases

Updating /home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar/results/index.html ... done
Updating /home/ahzed11/ssd/Code/Erlang/pw/erlang/_build/prod/rel/pixelwar/results/all_runs.html ... done