<div dir="ltr">Hello Devin,<div><div><br></div><div style>The recommended way to run the Erlang/OTP tests is to use ts as described in the testing howto[1].</div><div style><br></div><div style>If you want to do the testing with ct_run or erlexec you have to setup some of the environment manually. </div>
<div style><br></div><div style>In your case the Erlang VM cannot find the module ts_install_cth. This is a Common Test Hook needed by most OTP test suites to run. In the init_per_suite log you should have seen something like this:</div>
<div style><br></div><div style><div>*** CT 2013-10-24 23:42:25.116 *** Suite Hook</div><div>Failed to start a CTH: error:{undef,</div><div>                                 [{ts_install_cth,init,</div><div>                                      [#Ref<0.0.0.1380>,[]],</div>
<div>                                      []},</div><div>                                  {ct_hooks,call_init,3,</div><div>                                      [{file,"ct_hooks.erl"},{line,147}]},</div><div>                                  {ct_hooks,call,4,</div>
<div>                                      [{file,"ct_hooks.erl"},{line,222}]},</div><div>                                  {ct_hooks,call,4,</div><div>                                      [{file,"ct_hooks.erl"},{line,209}]},</div>
<div>                                  {ct_hooks,call,3,</div><div>                                      [{file,"ct_hooks.erl"},{line,183}]},</div><div>                                  {ct_framework,ct_suite_init,3,</div>
<div>                                      [{file,"ct_framework.erl"},{line,262}]},</div><div>                                  {test_server_sup,framework_call,4,</div><div>                                      [{file,"test_server_sup.erl"},</div>
<div>                                       {line,511}]},</div><div>                                  {test_server,run_test_case_eval,9,</div><div>                                      [{file,"test_server.erl"},</div>
<div>                                       {line,1120}]}]}</div></div><div style><br></div><div style>To make ct_run find that module you just have to add it to the path: </div><div style><br></div><div style><div><span style="font-family:arial,sans-serif;font-size:13px">ct_run -pa </span><span style="font-family:arial,sans-serif;font-size:13px">/opt/myrel/tests/test_server/</span><span style="font-family:arial,sans-serif;font-size:13px"> -no_auto_compile -suite ../emulator_test/float_SUITE</span></div>
</div><div style><br></div><div style>Lukas</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 6:55 PM, Devin Butterfield <span dir="ltr"><<a href="mailto:devin.butterfield@gmail.com" target="_blank">devin.butterfield@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>I am porting OTP to an embedded platform and trying to run standard OTP tests on target. I am new to erlang, so apologies is this a FAQ, though I have not found any explanation on the web. I've tried running directly using ct_run and also erlexec, but the results are the same: "Error detected: "Failed to start CTH, see the CT Log for details"". Looking at the log reveal *no* details about this failure. What am I missing? See below for output...<br>

<br></div><div>Thanks!<br>--<br></div><div>Regards, Devin<br></div><div><br></div>Using erlexec command: <br><br>######################<br># using erlexec<br>######################<br><br>root:/opt/myrel/tests/test_server> erlexec -sname test_server -rsh rsh -env PATH "/opt/myrel/tests/emulator_test:/sbin:/usr/sbin:/bin:/usr/bin:/opt/myrel/bin:/opt/myrel/erts-5.10.3/bin" -boot start_sasl -sasl errlog_type error -pz "/opt/ myrel/tests/test_server" -ct_test_vars "{net_dir,\"\"}" -eval "ts_run:ct_run_test(\"/opt/myrel/tests/emulator_test\", [{suite,float_SUITE},{logdir,\"../test_server\"},{auto_compile, false},{config,[\"../test_server/ts.config\",\"../test_server/ts.unix.config\"]},{vars,[{verbose,0}]},batch,{scale_timetraps,true}])" -noinput -s erlang halt<br>

<br></div>Common Test starting (cwd is /opt/myrel/tests/emulator_test)<br><br>CWD set to: "/opt/myrel/tests/test_server/ct_run.test_server@buildroot.2035-03-24_03.20.17"<br><br>TEST INFO: 1 test(s), 12 case(s) in 1 suite(s)<br>

<br>Testing tests.emulator_test.float_SUITE: Starting test, 12 test cases<br><br>- - - - - - - - - - - - - - - - - - - - - - - - - -<br>Error detected: "Failed to start CTH, see the CT Log for details"<br>- - - - - - - - - - - - - - - - - - - - - - - - - -<br>

<br>Testing tests.emulator_test.float_SUITE: *** FAILED *** init_per_suite<br>Testing tests.emulator_test.float_SUITE: TEST COMPLETE, 0 ok, 0 failed, 12 skipped of 12 test cases<br><br><br>Crash dump was written to: erl_crash.dump<br>

<br><br>###################<br></div><div><div># USING c_run<br>###################<br></div><div><br><br>root:/opt/myrel/tests/test_server> ct_run -no_auto_compile -suite ../emulator_test/float_SUITE<br><br>=PROGRESS REPORT==== 24-Mar-2035::03:29:17 ===<br>

          supervisor: {local,sasl_safe_sup}<br>             started: [{pid,<0.40.0>},<br>                       {name,alarm_handler},<br>                       {mfargs,{alarm_handler,start_link,[]}},<br>                       {restart_type,permanent},<br>

                       {shutdown,2000},<br>                       {child_type,worker}]<br><br>=PROGRESS REPORT==== 24-Mar-2035::03:29:18 ===<br>          supervisor: {local,sasl_safe_sup}<br>             started: [{pid,<0.41.0>},<br>

                       {name,overload},<br>                       {mfargs,{overload,start_link,[]}},<br>                       {restart_type,permanent},<br>                       {shutdown,2000},<br>                       {child_type,worker}]<br>

<br>=PROGRESS REPORT==== 24-Mar-2035::03:29:18 ===<br>          supervisor: {local,sasl_sup}<br>             started: [{pid,<0.39.0>},<br>                       {name,sasl_safe_sup},<br>                       {mfargs,<br>

                           {supervisor,start_link,<br>                               [{local,sasl_safe_sup},sasl,safe]}},<br>                       {restart_type,permanent},<br>                       {shutdown,infinity},<br>

                       {child_type,supervisor}]<br><br>=PROGRESS REPORT==== 24-Mar-2035::03:29:18 ===<br>          supervisor: {local,sasl_sup}<br>             started: [{pid,<0.42.0>},<br>                       {name,release_handler},<br>

                       {mfargs,{release_handler,start_link,[]}},<br>                       {restart_type,permanent},<br>                       {shutdown,2000},<br>                       {child_type,worker}]<br><br>=PROGRESS REPORT==== 24-Mar-2035::03:29:18 ===<br>

         application: sasl<br>          started_at: ct@buildroot<br><br><br>Common Test v1.7.3 starting (cwd is /opt/myrel/tests/test_server)<br><br>Eshell V5.10.3  (abort with ^G)<br>(ct@buildroot)1> <br>(ct@buildroot)1> <br>

CWD set to: "/opt/myrel/tests/test_server/ct_run.ct@buildroot.2035-03-24_03.29.20"<br>(ct@buildroot)1> <br>TEST INFO: 1 test(s), 12 case(s) in 1 suite(s)<br><br>(ct@buildroot)1> Testing tests.emulator_test.float_SUITE: Starting test, 12 test cases<br>

(ct@buildroot)1> <br>- - - - - - - - - - - - - - - - - - - - - - - - - -<br>Error detected: "Failed to start CTH, see the CT Log for details"<br>- - - - - - - - - - - - - - - - - - - - - - - - - -<br><br>(ct@buildroot)1> Testing tests.emulator_test.float_SUITE: *** FAILED *** init_per_suite<br>

(ct@buildroot)1> Testing tests.emulator_test.float_SUITE: TEST COMPLETE, 0 ok, 0 failed, 12 skipped of 12 test cases<br><br>(ct@buildroot)1> <br><br></div></div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>