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
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:
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.