Try to isolate my instability with go-ssb-room. I guess I did? Haven't found a resolution.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4469 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2023-09-21 23:38:55 +00:00
parent 26a778c3b2
commit 02dd8c3dd0
3 changed files with 175 additions and 24 deletions

View File

@ -658,7 +658,7 @@ static void _test_b64(const tf_test_options_t* options)
unlink("out/test.js");
}
static void _tf_test_run(const tf_test_options_t* options, const char* name, void (*test)(const tf_test_options_t* options))
static void _tf_test_run(const tf_test_options_t* options, const char* name, void (*test)(const tf_test_options_t* options), bool opt_in)
{
bool specified = false;
if (options->tests)
@ -677,7 +677,7 @@ static void _tf_test_run(const tf_test_options_t* options, const char* name, voi
tf_free(dup);
}
if (!options->tests || specified)
if ((!opt_in && !options->tests) || specified)
{
#define GREEN "\e[1;32m"
#define MAGENTA "\e[1;35m"
@ -695,27 +695,28 @@ static void _tf_test_run(const tf_test_options_t* options, const char* name, voi
void tf_tests(const tf_test_options_t* options)
{
_tf_test_run(options, "ssb", tf_ssb_test_ssb);
_tf_test_run(options, "ssb_id", tf_ssb_test_id_conversion);
_tf_test_run(options, "ssb_following", tf_ssb_test_following);
_tf_test_run(options, "nop", _test_nop);
_tf_test_run(options, "child", _test_child);
_tf_test_run(options, "promise", _test_promise);
_tf_test_run(options, "promise_remote_throw", _test_promise_remote_throw);
_tf_test_run(options, "promise_remote_reject", _test_promise_remote_reject);
_tf_test_run(options, "database", _test_database);
_tf_test_run(options, "this", _test_this);
_tf_test_run(options, "await", _test_await);
_tf_test_run(options, "import", _test_import);
_tf_test_run(options, "exit", _test_exit);
_tf_test_run(options, "icu", _test_icu);
_tf_test_run(options, "uint8array", _test_uint8array);
_tf_test_run(options, "float", _test_float);
_tf_test_run(options, "socket", _test_socket);
_tf_test_run(options, "file", _test_file);
_tf_test_run(options, "sign", _test_sign);
_tf_test_run(options, "b64", _test_b64);
_tf_test_run(options, "rooms", tf_ssb_test_rooms);
_tf_test_run(options, "bench", tf_ssb_test_bench);
_tf_test_run(options, "ssb", tf_ssb_test_ssb, false);
_tf_test_run(options, "ssb_id", tf_ssb_test_id_conversion, false);
_tf_test_run(options, "ssb_following", tf_ssb_test_following, false);
_tf_test_run(options, "nop", _test_nop, false);
_tf_test_run(options, "child", _test_child, false);
_tf_test_run(options, "promise", _test_promise, false);
_tf_test_run(options, "promise_remote_throw", _test_promise_remote_throw, false);
_tf_test_run(options, "promise_remote_reject", _test_promise_remote_reject, false);
_tf_test_run(options, "database", _test_database, false);
_tf_test_run(options, "this", _test_this, false);
_tf_test_run(options, "await", _test_await, false);
_tf_test_run(options, "import", _test_import, false);
_tf_test_run(options, "exit", _test_exit, false);
_tf_test_run(options, "icu", _test_icu, false);
_tf_test_run(options, "uint8array", _test_uint8array, false);
_tf_test_run(options, "float", _test_float, false);
_tf_test_run(options, "socket", _test_socket, false);
_tf_test_run(options, "file", _test_file, false);
_tf_test_run(options, "sign", _test_sign, false);
_tf_test_run(options, "b64", _test_b64, false);
_tf_test_run(options, "rooms", tf_ssb_test_rooms, false);
_tf_test_run(options, "bench", tf_ssb_test_bench, false);
_tf_test_run(options, "go-ssb-room", tf_ssb_test_go_ssb_room, true);
tf_printf("Tests completed.\n");
}