diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-12-22 19:00:09 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-12-22 19:00:09 +0000 |
commit | 7d79bec54d7b37aacb3914f4baa792315ce4f905 (patch) | |
tree | 1cdaf6389cb0aef649052061a047002064b05322 /src/or/test.c | |
parent | b68379b13b9169cf3542d678da6c1c2b4258c49e (diff) | |
download | tor-7d79bec54d7b37aacb3914f4baa792315ce4f905.tar.gz tor-7d79bec54d7b37aacb3914f4baa792315ce4f905.zip |
Expose bench_* functions via test cli
svn:r17740
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/or/test.c b/src/or/test.c index fb895c7ab6..b79f62cc29 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -4606,8 +4606,9 @@ test_geoip(void) 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 @@ static struct { ENT(rend_fns), SUBENT(rend_fns, v2), ENT(geoip), + + DISABLED(bench_aes), + DISABLED(bench_dmap), { NULL, NULL, 0, 0, 0 }, }; @@ -4733,7 +4737,7 @@ main(int c, char**v) 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 @@ main(int c, char**v) 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()); |