示例#1
0
文件: testio.c 项目: Jichao/axon_old
int main(int argc, char ** argv)
{
	char ch;
	if (argc == 0) {
		test_domain();
		test_localtcp();
		test_pipe();
		test_memcpy();
	} else {
		ch = getopt(argc, argv, "mcsdanr");
		switch(ch) {
			case 'm':
				test_domain();
				test_localtcp();
				test_pipe();
				test_memcpy();
				break;
			case 'd': 
				test_seq_disk(0);
				test_random_disk(0);
				break;
			case 'n':
				test_seq_disk(1);
				test_random_disk(1);
				break;
			case 'a':
				test_domain();
				test_localtcp();
				test_pipe();
				test_memcpy();
				test_seq_disk(1);
				test_random_disk(1);
				break;
			case 'r':
				test_random_write();
				break;
			case 'c':
				printf("connect remote svr\n");
				test_remote();
				break;
			case 's':
				printf("start listen svr\n");
				start_svr();
				break;
			default:
				printf("should add param: -a all\n-d disk\n-n disk no sync");
				printf("\n-m memory\n");
				printf("-c tcp client\n-s tcp server\n");
				break;
		}
	}
	sleep(1);
	return 0;
}
示例#2
0
int main( void ) {
/* See https://jira.mongodb.org/browse/CDRIVER-126
 * on why we exclude this test from running on WIN32 */
 
    initPrepostChunkProcessing(0);

    test_basic();
    test_streaming();
    test_random_write();
    
    /* Normally not necessary to run test_large(), as it
     * deals with very large (5GB) files and is therefore slow. */
    /*test_large();*/


    return 0;
}
示例#3
0
int main(int argc, char *argv[])
{
    const char * test_server = (argc > 1 ? argv[1] : TEST_SERVER);
/* See https://jira.mongodb.org/browse/CDRIVER-126
 * on why we exclude this test from running on WIN32 */
 
    test_basic();
    test_delete();
    test_streaming();
    test_random_write();
    test_random_write2();
    
#if defined(RUN_TEST_LARGE)
    test_large();
#endif


    return 0;
}