[or-cvs] r17740: {tor} Expose bench_* functions via test cli (tor/trunk/src/or)
nickm at seul.org
nickm at seul.org
Mon Dec 22 19:00:10 UTC 2008
Author: nickm
Date: 2008-12-22 14:00:09 -0500 (Mon, 22 Dec 2008)
New Revision: 17740
Modified:
tor/trunk/src/or/test.c
Log:
Expose bench_* functions via test cli
Modified: tor/trunk/src/or/test.c
===================================================================
--- tor/trunk/src/or/test.c 2008-12-22 19:00:05 UTC (rev 17739)
+++ tor/trunk/src/or/test.c 2008-12-22 19:00:09 UTC (rev 17740)
@@ -4606,8 +4606,9 @@
tor_free(s);
}
-#define ENT(x) { #x, test_ ## x, 0, 0 }
-#define SUBENT(x,y) { #x "/" #y, test_ ## x ## _ ## y, 1, 0 }
+#define DISABLED(x) { #x, x, 0, 0, 0 }
+#define ENT(x) { #x, test_ ## x, 0, 0, 1 }
+#define SUBENT(x,y) { #x "/" #y, test_ ## x ## _ ## y, 1, 0, 1 }
static struct {
const char *test_name;
@@ -4654,6 +4655,9 @@
ENT(rend_fns),
SUBENT(rend_fns, v2),
ENT(geoip),
+
+ DISABLED(bench_aes),
+ DISABLED(bench_dmap),
{ NULL, NULL, 0, 0, 0 },
};
@@ -4733,7 +4737,7 @@
if (!any_selected) {
for (i = 0; test_array[i].test_name; ++i) {
- test_array[i].selected = 1;
+ test_array[i].selected = test_array[i].is_default;
}
}
@@ -4759,16 +4763,6 @@
crypto_seed_rng(1);
- if (0) {
- bench_aes();
- return 0;
- }
-
- if (0) {
- bench_dmap();
- return 0;
- }
-
atexit(remove_directory);
printf("Running Tor unit tests on %s\n", get_uname());
More information about the tor-commits
mailing list