1
0

check.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-tools-check" role="wrap">
  8. <?dbhtml filename="check.html"?>
  9. <sect1info condition="script">
  10. <productname>check</productname>
  11. <productnumber>&check-version;</productnumber>
  12. <address>&check-url;</address>
  13. </sect1info>
  14. <title>Check-&check-version;</title>
  15. <indexterm zone="ch-tools-check">
  16. <primary sortas="a-Check">Check</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Check 是一个 C 语言单元测试框架。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&check-ch5-sbu;</seg>
  26. <seg>&check-ch5-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装 Check</title>
  32. <para>准备安装 Check:</para>
  33. <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
  34. <para>构建该软件包:</para>
  35. <screen><userinput remap="make">make</userinput></screen>
  36. <para>现在已经编译完成,执行以下命令执行 Check 测试套件:</para>
  37. <screen><userinput remap="test">make check</userinput></screen>
  38. <para>注意 Check 测试套件可能需要相对较长(高达 4 SBU)的时间。</para>
  39. <para>安装该软件包,并修复一个脚本:</para>
  40. <screen><userinput remap="install">make docdir=/usr/share/doc/check-&check-version; install
  41. sed -i '1 s/tools/usr/' /usr/bin/checkmk</userinput></screen>
  42. </sect2>
  43. <sect2 id="contents-check" role="content">
  44. <title>Check 的内容</title>
  45. <segmentedlist>
  46. <segtitle>安装的程序</segtitle>
  47. <segtitle>安装的库</segtitle>
  48. <seglistitem>
  49. <seg>checkmk</seg>
  50. <seg>libcheck.{a,so}</seg>
  51. </seglistitem>
  52. </segmentedlist>
  53. <variablelist>
  54. <bridgehead renderas="sect3">简要描述</bridgehead>
  55. <?dbfo list-presentation="list"?>
  56. <?dbhtml list-presentation="table"?>
  57. <varlistentry id="checkmk">
  58. <term><command>checkmk</command></term>
  59. <listitem>
  60. <para>用于生成 C 语言单元测试的 awk 脚本,
  61. 生成的单元测试可以和 Check 单元测试框架一起使用</para>
  62. <indexterm zone="ch-tools-check checkmk">
  63. <primary sortas="b-checmk">checkmk</primary>
  64. </indexterm>
  65. </listitem>
  66. </varlistentry>
  67. <varlistentry id="libcheck">
  68. <term><filename class="libraryfile">libcheck.{a,so}</filename></term>
  69. <listitem>
  70. <para>包含使得测试程序能够调用 Check 的函数</para>
  71. <indexterm zone="ch-tools-check libcheck">
  72. <primary sortas="c-libcheck">libcheck</primary>
  73. </indexterm>
  74. </listitem>
  75. </varlistentry>
  76. </variablelist>
  77. </sect2>
  78. </sect1>