int main (int argc, char *argv[]) { TestSuite suite; int ret; TestSuite_Init (&suite, "", argc, argv); test_atomic_install (&suite); test_bcon_basic_install (&suite); test_bcon_extract_install (&suite); test_bson_install (&suite); test_clock_install (&suite); test_error_install (&suite); test_endian_install (&suite); test_iso8601_install (&suite); test_iter_install (&suite); test_json_install (&suite); test_oid_install (&suite); test_reader_install (&suite); test_string_install (&suite); test_utf8_install (&suite); test_value_install (&suite); test_writer_install (&suite); ret = TestSuite_Run (&suite); TestSuite_Destroy (&suite); return ret; }
int main (int argc, char *argv[]) { TestSuite suite; int ret; mongoc_init (); bson_snprintf (MONGOC_TEST_UNIQUE, sizeof MONGOC_TEST_UNIQUE, "test_%u_%u", (unsigned)time (NULL), (unsigned)gettestpid ()); set_mongoc_test_host (); mongoc_log_set_handler (log_handler, NULL); TestSuite_Init (&suite, "", argc, argv); test_array_install (&suite); test_buffer_install (&suite); test_client_install (&suite); test_client_pool_install (&suite); test_write_command_install (&suite); test_bulk_install (&suite); test_collection_install (&suite); test_cursor_install (&suite); test_database_install (&suite); test_gridfs_install (&suite); test_gridfs_file_page_install (&suite); test_list_install (&suite); test_matcher_install (&suite); test_queue_install (&suite); test_read_prefs_install (&suite); test_rpc_install (&suite); test_stream_install (&suite); test_uri_install (&suite); test_write_concern_install (&suite); #ifdef MONGOC_ENABLE_SSL test_x509_install (&suite); test_stream_tls_install (&suite); #endif ret = TestSuite_Run (&suite); TestSuite_Destroy (&suite); mongoc_cleanup(); return ret; }
int main (int argc, char *argv[]) { TestSuite suite; int ret; mongoc_init(); set_mongoc_test_host(); mongoc_log_set_handler (log_handler, NULL); TestSuite_Init (&suite, "", argc, argv); test_array_install (&suite); test_buffer_install (&suite); test_client_install (&suite); test_client_pool_install (&suite); test_collection_install (&suite); test_cursor_install (&suite); test_database_install (&suite); test_gridfs_install (&suite); test_gridfs_file_page_install (&suite); test_list_install (&suite); test_matcher_install (&suite); test_queue_install (&suite); test_read_prefs_install (&suite); test_rpc_install (&suite); test_stream_install (&suite); test_uri_install (&suite); #ifdef MONGOC_ENABLE_SSL test_x509_install (&suite); test_stream_tls_install (&suite); #endif ret = TestSuite_Run (&suite); TestSuite_Destroy (&suite); return ret; }
static int TestSuite_RunFuncInChild (TestSuite *suite, /* IN */ Test *test) /* IN */ { pid_t child; int exit_code = -1; int fd; if (suite->outfile) { fflush (suite->outfile); } if (-1 == (child = fork())) { return -1; } if (!child) { if (suite->outfile) { fclose (suite->outfile); suite->outfile = NULL; } fd = open ("/dev/null", O_WRONLY); dup2 (fd, STDOUT_FILENO); close (fd); srand (test->seed); test->func (test->ctx); TestSuite_Destroy (suite); exit (0); } if (-1 == waitpid (child, &exit_code, 0)) { perror ("waitpid()"); } return exit_code; }
int main (int argc, char *argv[]) { TestSuite suite; int ret; TestSuite_Init (&suite, "", argc, argv); test_atomic_install (&suite); test_bcon_basic_install (&suite); test_bcon_extract_install (&suite); test_bson_install (&suite); test_clock_install (&suite); test_error_install (&suite); test_endian_install (&suite); test_iso8601_install (&suite); test_iter_install (&suite); test_json_install (&suite); test_oid_install (&suite); test_reader_install (&suite); test_string_install (&suite); test_utf8_install (&suite); test_value_install (&suite); test_version_install (&suite); test_writer_install (&suite); #ifdef BSON_EXPERIMENTAL_FEATURES test_decimal128_install (&suite); test_bson_type_install (&suite); #endif ret = TestSuite_Run (&suite); TestSuite_Destroy (&suite); return ret; }