19
19
<LINK REL="STYLESHEET" HREF="clamdoc.css">
21
<LINK REL="next" HREF="node25.html">
22
<LINK REL="previous" HREF="node9.html">
23
<LINK REL="up" HREF="clamdoc.html">
21
<LINK REL="next" HREF="node18.html">
22
<LINK REL="previous" HREF="node16.html">
23
<LINK REL="up" HREF="node11.html">
24
24
<LINK REL="next" HREF="node18.html">
29
29
<DIV CLASS="navigation"><!--Navigation Panel-->
31
31
HREF="node18.html">
32
32
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
33
36
<A NAME="tex2html416"
35
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
37
37
HREF="node16.html">
38
38
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
41
41
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
43
<B> Next:</B> <A NAME="tex2html421"
44
HREF="node18.html">clamd</A>
45
<B> Up:</B> <A NAME="tex2html417"
46
HREF="clamdoc.html">clamdoc</A>
47
<B> Previous:</B> <A NAME="tex2html411"
48
HREF="node16.html">Reporting a unit test</A>
49
<B> <A NAME="tex2html419"
43
<B> Next:</B> <A NAME="tex2html427"
44
HREF="node18.html">Reporting a unit test</A>
45
<B> Up:</B> <A NAME="tex2html423"
46
HREF="node11.html">Installation</A>
47
<B> Previous:</B> <A NAME="tex2html417"
48
HREF="node16.html">Compilation with clamav-milter enabled</A>
49
<B> <A NAME="tex2html425"
50
50
HREF="node1.html">Contents</A></B>
53
53
<!--End of Navigation Panel-->
55
<H1><A NAME="SECTION00050000000000000000">
61
<!--Table of Child-Links-->
62
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
64
<UL CLASS="ChildLinks">
65
<LI><A NAME="tex2html422"
66
HREF="node18.html">clamd</A>
68
<LI><A NAME="tex2html423"
69
HREF="node19.html">On-access scanning</A>
72
<LI><A NAME="tex2html424"
73
HREF="node20.html">clamav-milter</A>
74
<LI><A NAME="tex2html425"
75
HREF="node21.html">Testing</A>
76
<LI><A NAME="tex2html426"
77
HREF="node22.html">Setting up auto-updating</A>
79
<LI><A NAME="tex2html427"
80
HREF="node23.html">Closest mirrors</A>
83
<LI><A NAME="tex2html428"
84
HREF="node24.html">ClamAV Active Malware Report</A>
86
<!--End of Table of Child-Links-->
55
<H2><A NAME="SECTION00046000000000000000"></A><A NAME="unit-testing"></A>
59
ClamAV includes unit tests that allow you to test that the compiled binaries work correctly on your platform.
62
The first step is to use your OS's package manager to install the <code>check</code> package.
63
If your OS doesn't have that package, you can download it from <TT><A NAME="tex2html11"
64
HREF="http://check.sourceforge.net/">http://check.sourceforge.net/</A></TT>,
65
build it and install it.
68
To help clamav's configure script locate <code>check</code>, it is recommended that you install <code>pkg-config</code>, preferably
69
using your OS's package manager, or from <TT><A NAME="tex2html12"
70
HREF="http://pkg-config.freedesktop.org">http://pkg-config.freedesktop.org</A></TT>.
73
The recommended way to run unit-tests is the following, which ensures you will get an error if unit tests cannot be built:
75
HREF="footnode.html#foot165"><SUP><SPAN CLASS="arabic">7</SPAN></SUP></A> <PRE>
76
$ ./configure --enable-check
82
When <code>make check</code> is finished, you should get a message similar to this:
90
If a unit test fails, you get a message similar to the following.
91
See the next section on how to report a bug when a unit test fails.
93
========================================
95
Please report to http://bugs.clamav.net/
96
========================================
100
If unit tests are disabled (and you didn't use -enable-check), you will get this message:
102
*** Unit tests disabled in this build
103
*** Use ./configure --enable-check to enable them
107
PASS: check_freshclam.sh
108
PASS: check_sigtool.sh
109
PASS: check_clamscan.sh
110
======================
112
(1 tests were not run)
113
======================
115
Running <code>./configure --enable-check</code> should tell you why.
119
<DIV CLASS="navigation"><HR>
120
<!--Navigation Panel-->
121
<A NAME="tex2html426"
123
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
124
<A NAME="tex2html422"
126
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
127
<A NAME="tex2html416"
129
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
130
<A NAME="tex2html424"
132
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
134
<B> Next:</B> <A NAME="tex2html427"
135
HREF="node18.html">Reporting a unit test</A>
136
<B> Up:</B> <A NAME="tex2html423"
137
HREF="node11.html">Installation</A>
138
<B> Previous:</B> <A NAME="tex2html417"
139
HREF="node16.html">Compilation with clamav-milter enabled</A>
140
<B> <A NAME="tex2html425"
141
HREF="node1.html">Contents</A></B> </DIV>
142
<!--End of Navigation Panel-->