~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to unit_tests/check_clamav.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
516
516
#endif
517
517
}
518
518
 
 
519
static void check_version_compatible()
 
520
{
 
521
    /* check 0.9.8 is not ABI compatible with 0.9.6,
 
522
     * if by accident you compile with check 0.9.6 header
 
523
     * and link with 0.9.8 then check will hang/crash. */
 
524
    if ((check_major_version != CHECK_MAJOR_VERSION) ||
 
525
        (check_minor_version != CHECK_MINOR_VERSION) ||
 
526
        (check_micro_version != CHECK_MICRO_VERSION)) {
 
527
        fprintf(stderr, "ERROR: check version mismatch!\n"
 
528
                "\tVersion from header: %u.%u.%u\n"
 
529
                "\tVersion from library: %u.%u.%u\n"
 
530
                "\tMake sure check.h and -lcheck are same version!\n",
 
531
                CHECK_MAJOR_VERSION,
 
532
                CHECK_MINOR_VERSION,
 
533
                CHECK_MICRO_VERSION,
 
534
                check_major_version,
 
535
                check_minor_version,
 
536
                check_micro_version);
 
537
        exit(EXIT_FAILURE);
 
538
    }
 
539
}
519
540
 
520
541
int main(void)
521
542
{
522
543
    int nf;
523
 
    Suite *s = test_cl_suite();
524
 
    SRunner *sr = srunner_create(s);
 
544
    Suite *s;
 
545
    SRunner *sr;
 
546
 
 
547
    check_version_compatible();
 
548
    s = test_cl_suite();
 
549
    sr = srunner_create(s);
525
550
#ifdef CHECK_HAVE_LOOPS
526
551
    srunner_add_suite(sr, test_cli_suite());
527
552
#else
534
559
    srunner_add_suite(sr, test_uniq_suite());
535
560
    srunner_add_suite(sr, test_matchers_suite());
536
561
    srunner_add_suite(sr, test_htmlnorm_suite());
 
562
    srunner_add_suite(sr, test_bytecode_suite());
537
563
 
538
564
    srunner_set_log(sr, "test.log");
539
565
    if(freopen("test-stderr.log","w+",stderr) == NULL) {