【问题标题】:Erlang command test failed to write "coverlog"Erlang 命令测试无法写入“coverlog”
【发布时间】:2013-05-22 02:05:15
【问题描述】:

我正在使用以下命令行运行 Common Test:

$ run_test -pa ../ebin -spec test.spec.all

并得到以下错误。为什么 io:format() 调用会出现 badarg 错误?

Testing testdir2.bds1.ep_SUITE: Starting test, 3 test cases


ERROR: Could not write normal heading in coverlog.
CoverLog: <0.318.0>
Reason: {badarg,[{io,format,
                     [<0.318.0>,
                      "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<!-- autogenerated by '~w'. -->\n<html>\n<head><title>Coverage results</title></head>\n<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"purple\" alink=\"red\">",
                      [test_server_ctrl]],
                     []},
                 {test_server_ctrl,write_coverlog_header,1,
                                   [{file,"test_server_ctrl.erl"},
                                    {line,5731}]},
                 {test_server_ctrl,write_default_coverlog,1,
                                   [{file,"test_server_ctrl.erl"},
                                    {line,5803}]},
                 {test_server_ctrl,stop_extra_tools,1,
                                   [{file,"test_server_ctrl.erl"},
                                    {line,1464}]},
                 {test_server_ctrl,init_tester,9,
                                   [{file,"test_server_ctrl.erl"},
                                    {line,1403}]}]}
Suite testdir2.bds1.ep_SUITE was killed with reason {terminated,
                                                       [{io,format,
                                                         [<0.318.0>,
                                                          "<html><body>\n",[]],
                                                         []},
                                                        {test_server_ctrl,
                                                         write_default_coverlog, 
                                                         1,
                                                         [{file,
                                                           "test_server_ctrl.erl"},
                                                          {line,5803}]},
                                                        {test_server_ctrl,
                                                         stop_extra_tools,1,
                                                         [{file,
                                                           "test_server_ctrl.erl"},
                                                          {line,1464}]},
                                                        {test_server_ctrl,
                                                         init_tester,9,
                                                         [{file,
                                                           "test_server_ctrl.erl"},
                                                          {line,1403}]}]}

【问题讨论】:

  • 您确定进程&lt;0.318.0&gt; 仍然存在吗?格式消息发送到哪里?使用这些参数手动调用io:format&lt;0.318.0&gt; 除外。

标签: testing erlang common-test


【解决方案1】:

你确定你在 io:format 模式中有类似 ~s 的东西吗?

你能提供一些实际具有这种 io:format 的代码吗?

【讨论】:

    猜你喜欢
    • 2012-09-10
    • 1970-01-01
    • 2015-08-15
    • 1970-01-01
    • 2016-10-06
    • 1970-01-01
    • 2019-08-02
    • 2021-12-22
    • 1970-01-01
    相关资源
    最近更新 更多