X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dbus%2Fdbus-marshal-recursive-util.c;h=6d62983f03c8218759dfa186940d36e26933d535;hb=1200c464b6c9051340960e07f0d61a51dad71286;hp=345b891f5e7141a89e4d85a76e5021816b18354e;hpb=82495f4b4077b8bb60a9d0d23b13bbe54e79dae0;p=platform%2Fupstream%2Fdbus.git diff --git a/dbus/dbus-marshal-recursive-util.c b/dbus/dbus-marshal-recursive-util.c index 345b891..6d62983 100644 --- a/dbus/dbus-marshal-recursive-util.c +++ b/dbus/dbus-marshal-recursive-util.c @@ -23,7 +23,7 @@ #include -#ifdef DBUS_BUILD_TESTS +#ifdef DBUS_ENABLE_EMBEDDED_TESTS #include "dbus-marshal-recursive.h" #include "dbus-marshal-basic.h" @@ -38,8 +38,8 @@ basic_value_zero (DBusBasicValue *value) #ifdef DBUS_HAVE_INT64 value->u64 = 0; #else - value->u64.first32 = 0; - value->u64.second32 = 0; + value->eight.first32 = 0; + value->eight.second32 = 0; #endif } @@ -59,8 +59,8 @@ basic_value_equal (int type, #ifdef DBUS_HAVE_INT64 return lhs->u64 == rhs->u64; #else - return lhs->u64.first32 == rhs->u64.first32 && - lhs->u64.second32 == rhs->u64.second32; + return lhs->eight.first32 == rhs->eight.first32 && + lhs->eight.second32 == rhs->eight.second32; #endif } } @@ -1924,6 +1924,14 @@ make_and_run_test_nodes (void) node_destroy (node); } + if (_dbus_getenv ("DBUS_TEST_SLOW") == NULL || + atoi (_dbus_getenv ("DBUS_TEST_SLOW")) < 1) + { + fprintf (stderr, "skipping remaining marshal-recursive tests, " + "run with DBUS_TEST_SLOW=1 (or more) to enable\n"); + goto out; + } + start_next_test ("Each container of each container of each value %d iterations\n", N_CONTAINERS * N_CONTAINERS * N_VALUES); for (i = 0; i < N_CONTAINERS; i++) @@ -1996,8 +2004,15 @@ make_and_run_test_nodes (void) node_destroy (outer_container); } -#if 0 - /* This one takes a really long time, so comment it out for now */ + /* This one takes a really long time (10 minutes on a Core2), so only enable + * it if you're really sure */ + if (atoi (_dbus_getenv ("DBUS_TEST_SLOW")) < 2) + { + fprintf (stderr, "skipping really slow marshal-recursive test, " + "run with DBUS_TEST_SLOW=2 (or more) to enable\n"); + goto out; + } + start_next_test ("Each value,value,value triplet combination as toplevel, in all orders %d iterations\n", N_VALUES * N_VALUES * N_VALUES); { @@ -2021,8 +2036,8 @@ make_and_run_test_nodes (void) node_destroy (nodes[0]); } } -#endif /* #if 0 expensive test */ +out: fprintf (stderr, "%d total iterations of recursive marshaling tests\n", n_iterations_completed_total); fprintf (stderr, "each iteration ran at initial offsets 0 through %d in both big and little endian\n", @@ -3559,4 +3574,4 @@ container_destroy (TestTypeNode *node) #endif /* !DOXYGEN_SHOULD_SKIP_THIS */ -#endif /* DBUS_BUILD_TESTS */ +#endif /* DBUS_ENABLE_EMBEDDED_TESTS */