git-svn: trunk@4863
Török Edvin authored on 2009/02/26 04:28:48... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Wed Feb 25 22:01:53 EET 2009 (edwin) |
|
2 |
+------------------------------------ |
|
3 |
+ * unit_tests/check_clamd.c: fix build with old versions of check |
|
4 |
+ |
|
1 | 5 |
Wed Feb 25 18:17:03 CET 2009 (acab) |
2 | 6 |
----------------------------------- |
3 | 7 |
* clamd, clamav-milter: unify default max stream sizes |
... | ... |
@@ -22,7 +22,6 @@ |
22 | 22 |
#if HAVE_CONFIG_H |
23 | 23 |
#include "clamav-config.h" |
24 | 24 |
#endif |
25 |
- |
|
26 | 25 |
#include "shared/fdpassing.h" |
27 | 26 |
#include <arpa/inet.h> |
28 | 27 |
#include <netinet/in.h> |
... | ... |
@@ -233,6 +232,7 @@ static void test_command(const char *cmd, size_t len, const char *extra, const c |
233 | 233 |
free(recvdata); |
234 | 234 |
} |
235 | 235 |
|
236 |
+#ifdef CHECK_HAVE_LOOPS |
|
236 | 237 |
START_TEST (test_basic_commands) |
237 | 238 |
{ |
238 | 239 |
struct basic_test *test = &basic_tests[_i]; |
... | ... |
@@ -289,6 +289,7 @@ START_TEST (test_compat_commands) |
289 | 289 |
} |
290 | 290 |
} |
291 | 291 |
END_TEST |
292 |
+#endif |
|
292 | 293 |
|
293 | 294 |
#define EXPECT_INSTREAM "stream: ClamAV-Test-File.UNOFFICIAL FOUND\n" |
294 | 295 |
|
... | ... |
@@ -456,6 +457,7 @@ static struct cmds { |
456 | 456 |
{"zFILDES", '\0', CLEANFILE, CLEANFDREPLY} |
457 | 457 |
}; |
458 | 458 |
|
459 |
+#ifdef CHECK_HAVE_LOOPS |
|
459 | 460 |
START_TEST (test_fildes) |
460 | 461 |
{ |
461 | 462 |
char nreply[BUFSIZ], nsend[BUFSIZ]; |
... | ... |
@@ -502,6 +504,7 @@ START_TEST (test_fildes) |
502 | 502 |
} |
503 | 503 |
} |
504 | 504 |
END_TEST |
505 |
+#endif |
|
505 | 506 |
|
506 | 507 |
START_TEST (test_fildes_many) |
507 | 508 |
{ |
... | ... |
@@ -701,9 +704,11 @@ static Suite *test_clamd_suite(void) |
701 | 701 |
tc_commands = tcase_create("clamd commands"); |
702 | 702 |
suite_add_tcase(s, tc_commands); |
703 | 703 |
tcase_add_unchecked_fixture(tc_commands, commands_setup, commands_teardown); |
704 |
+#ifdef CHECK_HAVE_LOOPS |
|
704 | 705 |
tcase_add_loop_test(tc_commands, test_basic_commands, 0, sizeof(basic_tests)/sizeof(basic_tests[0])); |
705 | 706 |
tcase_add_loop_test(tc_commands, test_compat_commands, 0, sizeof(basic_tests)/sizeof(basic_tests[0])); |
706 | 707 |
tcase_add_loop_test(tc_commands, test_fildes, 0, 4*sizeof(fildes_cmds)/sizeof(fildes_cmds[0])); |
708 |
+#endif |
|
707 | 709 |
tcase_add_test(tc_commands, test_stats); |
708 | 710 |
tcase_add_test(tc_commands, test_instream); |
709 | 711 |
tcase_add_test(tc_commands, test_stream); |