123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-tools-check" role="wrap">
- <?dbhtml filename="check.html"?>
- <sect1info condition="script">
- <productname>check</productname>
- <productnumber>&check-version;</productnumber>
- <address>&check-url;</address>
- </sect1info>
- <title>Check-&check-version;</title>
- <indexterm zone="ch-tools-check">
- <primary sortas="a-Check">Check</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <para>Check 是一个 C 语言单元测试框架。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&check-ch5-sbu;</seg>
- <seg>&check-ch5-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 Check</title>
- <para>准备安装 Check:</para>
- <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
- <para>构建该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>现在已经编译完成,执行以下命令执行 Check 测试套件:</para>
- <screen><userinput remap="test">make check</userinput></screen>
- <para>注意 Check 测试套件可能需要相对较长(高达 4 SBU)的时间。</para>
- <para>安装该软件包,并修复一个脚本:</para>
- <screen><userinput remap="install">make install
- sed -i '1 s/tools/usr/' /usr/bin/checkmk</userinput></screen>
- </sect2>
- <sect2 id="contents-check" role="content">
- <title>Check 的内容</title>
- <segmentedlist>
- <segtitle>安装的程序</segtitle>
- <segtitle>安装的库</segtitle>
- <seglistitem>
- <seg>checkmk</seg>
- <seg>libcheck.{a,so}</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="checkmk">
- <term><command>checkmk</command></term>
- <listitem>
- <para>用于生成 C 语言单元测试的 awk 脚本,
- 生成的单元测试可以和 Check 单元测试框架一起使用</para>
- <indexterm zone="ch-tools-check checkmk">
- <primary sortas="b-checmk">checkmk</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libcheck">
- <term><filename class="libraryfile">libcheck.{a,so}</filename></term>
- <listitem>
- <para>包含使得测试程序能够调用 Check 的函数</para>
- <indexterm zone="ch-tools-check libcheck">
- <primary sortas="c-libcheck">libcheck</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|