~ubuntu-branches/ubuntu/raring/clamav/raring

« back to all changes in this revision

Viewing changes to unit_tests/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran
  • Date: 2008-09-05 17:25:34 UTC
  • mfrom: (0.35.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080905172534-yi3f8fkye1o7u1r3
* New upstream version (closes: #497662, #497773)
  - lots of new options for clamd.conf
  - fixes CVEs CVE-2008-3912, CVE-2008-3913, CVE-2008-3914, and
    CVE-2008-1389
* No longer supports --unzip option, so typo is gone (closes: #496276)
* Translations:
  - sv (thanks Martin Bagge <brother@bsnet.se>) (closes: #491760)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
SPLIT_DIR=$(top_srcdir)/unit_tests/.split
 
2
FILES = clam-phish-exe
 
3
 
 
4
check_clamd.sh: $(FILES)
 
5
 
 
6
$(FILES) :
 
7
        cat $(SPLIT_DIR)/split.$@aa $(SPLIT_DIR)/split.$@ab > $@
 
8
 
 
9
programs = check_clamav
 
10
scripts = check_clamd.sh check_freshclam.sh check_sigtool.sh check_clamscan.sh valgrind_tests.sh
 
11
TESTS = $(programs) $(scripts)
 
12
if ENABLE_UT_INSTALL 
 
13
bin_PROGRAMS = $(programs)
 
14
dist_bin_SCRIPTS = $(scripts)
 
15
else
 
16
check_PROGRAMS = $(programs)
 
17
check_SCRIPTS = $(scripts)
 
18
endif
 
19
check_clamav_SOURCES = check_clamav.c check_jsnorm.c check_str.c check_regex.c checks.h $(top_builddir)/libclamav/clamav.h check_disasm.c check_uniq.c check_matchers.c
 
20
check_clamav_CFLAGS = @CHECK_CFLAGS@ -DSRCDIR=\"$(abs_srcdir)\"
 
21
check_clamav_LDADD = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ @CHECK_LIBS@
 
22
 
 
23
check_clamd.sh: $(top_builddir)/test/clam.exe
 
24
check_clamscan.sh: $(top_builddir)/test/clam.exe
 
25
 
 
26
$(top_builddir)/test/clam.exe:
 
27
        (cd $(top_builddir)/test && $(MAKE))
 
28
 
 
29
CLEANFILES=lcov.out *.gcno *.gcda *.log clamd-test.socket /tmp/clamd-test.log $(FILES) test-stderr.log clamscan.log valgrind.log clamdscan.log
 
30
EXTRA_DIST=.split input test-clamd.conf test-freshclam.conf valgrind.supp virusaction-test.sh
 
31
if ENABLE_COVERAGE
 
32
LCOV_OUTPUT = lcov.out
 
33
LCOV_HTML = lcov_html
 
34
LCOV_LCOV = @LCOV@
 
35
LCOV_GCOV = @GCOV@
 
36
LCOV_GENHTML = @GENHTML@
 
37
lcov: $(LCOV_HTML)
 
38
 
 
39
DIRECTORIES=--directory . --directory ../libclamav --directory ../clamd --directory ../freshclam --directory ../sigtool --directory ../clamscan --directory ../clamdscan
 
40
.libs/check_clamav.gcda: $(TESTS)
 
41
        $(LCOV_LCOV) $(DIRECTORIES) --zerocounters
 
42
        @$(MAKE) check VALGRIND=
 
43
 
 
44
$(LCOV_OUTPUT): .libs/check_clamav.gcda
 
45
        $(LCOV_LCOV) --capture $(DIRECTORIES) --output-file $@
 
46
 
 
47
$(LCOV_HTML): $(LCOV_OUTPUT)
 
48
        -$(RM) -r $@
 
49
        LANG=C $(LCOV_GENHTML) --output-directory $@ --title "ClamAV Code Coverage" --show-details $<
 
50
        @echo "Open `pwd`/$(LCOV_HTML)/index.html in a browser."
 
51
 
 
52
clean-local: lcov-clean
 
53
.PHONY: lcov-clean
 
54
lcov-clean:
 
55
        -$(RM) -r $(LCOV_HTML) $(LCOV_OUTPUT)
 
56
        $(LCOV_LCOV) $(DIRECTORIES) --zerocounters
 
57
else
 
58
 
 
59
lcov:
 
60
        @echo "Coverage information gathering is not enabled in this build"
 
61
        @echo "Use ./configure --enable-coverage to enable it"
 
62
        @exit 1
 
63
endif