Skip to content

Commit 591e168

Browse files
committed
remove scaffolding
1 parent c85f666 commit 591e168

File tree

9 files changed

+9
-44
lines changed

9 files changed

+9
-44
lines changed

.evergreen/compile-unix.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ if [ "$ANALYZE" != "ON" ]; then
261261
fi
262262

263263
# We are done here if we don't want to run the tests.
264-
# if [ "$SKIP_MOCK_TESTS" = "ON" ]; then
265-
exit 0
266-
# fi
264+
if [ "$SKIP_MOCK_TESTS" = "ON" ]; then
265+
exit 0
266+
fi
267267

268268
if [ "$VALGRIND" = "ON" ]; then
269269
# Defines "run_valgrind" shell function.

.evergreen/compile-windows.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ export MONGOC_TEST_SKIP_LIVE=on
130130
export MONGOC_TEST_SKIP_SLOW=on
131131

132132
# We are done here if we don't want to run the tests.
133-
# if [ "$SKIP_MOCK_TESTS" = "ON" ]; then
134-
exit 0
135-
# fi
133+
if [ "$SKIP_MOCK_TESTS" = "ON" ]; then
134+
exit 0
135+
fi
136136

137137
export MONGOC_TEST_SERVER_LOG=stdout
138138

.evergreen/run-tests.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/sh
22
set -o errexit # Exit the script with error if any of the commands fail
3-
set -o xtrace
43

54

65
COMPRESSORS=${COMPRESSORS:-nocompressors}
@@ -119,9 +118,6 @@ check_mongocryptd() {
119118
fi
120119
}
121120

122-
# TODO: run all tests.
123-
TEST_ARGS="$TEST_ARGS -l /client_side_encryption/*"
124-
125121
export MONGOC_TEST_MONITORING_VERBOSE=on
126122

127123
# Ensure mock KMS servers are running before starting tests.
@@ -176,7 +172,7 @@ case "$OS" in
176172
check_mongocryptd
177173

178174
chmod +x src/libmongoc/Debug/test-libmongoc.exe
179-
./src/libmongoc/Debug/test-libmongoc.exe --no-fork $TEST_ARGS -d
175+
./src/libmongoc/Debug/test-libmongoc.exe $TEST_ARGS -d
180176
;;
181177

182178
*)

src/libmongoc/src/mongoc/mongoc-crypt.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,6 @@ _state_need_mongo_keys (_state_machine_t *state_machine, bson_error_t *error)
381381
/* 2. Feed all resulting documents back (if any) with repeated calls to
382382
* mongocrypt_ctx_mongo_feed. */
383383
while (mongoc_cursor_next (cursor, &key_bson)) {
384-
char *doc = bson_as_json (key_bson, NULL);
385-
MONGOC_DEBUG ("_state_need_mongo_keys got document: %s", doc);
386-
bson_free (doc);
387-
388384
mongocrypt_binary_destroy (key_bin);
389385
key_bin = mongocrypt_binary_new_from_data (
390386
(uint8_t *) bson_get_data (key_bson), key_bson->len);
@@ -613,25 +609,6 @@ _state_ready (_state_machine_t *state_machine,
613609
return ret;
614610
}
615611

616-
static const char *state_to_string (mongocrypt_ctx_state_t state) {
617-
switch (state) {
618-
case MONGOCRYPT_CTX_ERROR:
619-
return "MONGOCRYPT_CTX_ERROR";
620-
case MONGOCRYPT_CTX_NEED_MONGO_COLLINFO:
621-
return "MONGOCRYPT_CTX_NEED_MONGO_COLLINFO";
622-
case MONGOCRYPT_CTX_NEED_MONGO_MARKINGS:
623-
return "MONGOCRYPT_CTX_NEED_MONGO_MARKINGS";
624-
case MONGOCRYPT_CTX_NEED_MONGO_KEYS:
625-
return "MONGOCRYPT_CTX_NEED_MONGO_KEYS";
626-
case MONGOCRYPT_CTX_NEED_KMS:
627-
return "MONGOCRYPT_CTX_NEED_KMS";
628-
case MONGOCRYPT_CTX_READY:
629-
return "MONGOCRYPT_CTX_READY";
630-
case MONGOCRYPT_CTX_DONE:
631-
return "MONGOCRYPT_CTX_DONE";
632-
}
633-
}
634-
635612
/*--------------------------------------------------------------------------
636613
*
637614
* _mongoc_cse_run_state_machine --
@@ -654,7 +631,6 @@ _state_machine_run (_state_machine_t *state_machine,
654631

655632
bson_init (result);
656633
while (true) {
657-
MONGOC_DEBUG ("%s: state is %s\n", state_machine->db_name ? state_machine->db_name : "NULL", state_to_string (mongocrypt_ctx_state (state_machine->ctx)));
658634
switch (mongocrypt_ctx_state (state_machine->ctx)) {
659635
default:
660636
case MONGOCRYPT_CTX_ERROR:

src/libmongoc/src/mongoc/mongoc-log.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ mongoc_log (mongoc_log_level_t log_level,
104104
bson_mutex_unlock (&gLogMutex);
105105

106106
bson_free (message);
107-
fflush (stdout);
108107
}
109108

110109

src/libmongoc/tests/json-test-monitoring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ succeeded_cb (const mongoc_apm_command_succeeded_t *event)
153153
char *reply_json;
154154

155155
reply_json = bson_as_canonical_extended_json (event->reply, NULL);
156-
MONGOC_DEBUG ("<-- %s COMMAND SUCCEEDED: %s\n", mongoc_apm_command_succeeded_get_command_name (event), reply_json);
156+
MONGOC_DEBUG ("<-- COMMAND SUCCEEDED: %s\n", reply_json);
157157
bson_free (reply_json);
158158
}
159159

src/libmongoc/tests/json-test-operations.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -958,10 +958,6 @@ single_write (mongoc_collection_t *collection,
958958
abort ();
959959
}
960960

961-
if (!r) {
962-
MONGOC_DEBUG ("operation %s has error: %s", name, error.message);
963-
}
964-
965961
value_init_from_doc (&value, reply);
966962
check_result (test, operation, r, &value, &error);
967963
bson_value_destroy (&value);

src/libmongoc/tests/json-test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,8 +1708,6 @@ run_json_general_test (const json_test_config_t *config)
17081708
continue;
17091709
}
17101710

1711-
MONGOC_DEBUG ("running test: %s", description);
1712-
17131711
if (bson_has_field (&test, "skipReason")) {
17141712
fprintf (stderr,
17151713
" - %s SKIPPED, reason: %s\n",

src/libmongoc/tests/test-conveniences.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ tmp_bson (const char *json, ...)
121121
doc = bson_new_from_json ((const uint8_t *) double_quoted, -1, &error);
122122

123123
if (!doc) {
124-
fprintf (stderr, "%s\n", error.message);
124+
fprintf (stderr, "%s: %s\n", error.message, json);
125125
abort ();
126126
}
127127

0 commit comments

Comments
 (0)