From: Nick Mathewson Date: Mon, 13 Jan 2014 21:34:28 +0000 (-0500) Subject: Add an --accel switch to run unit tests with crypto acceleration X-Git-Tag: tor-0.2.5.2-alpha~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab0fdbb618f52effad41625e88ee341e402a4d6d;p=thirdparty%2Ftor.git Add an --accel switch to run unit tests with crypto acceleration --- diff --git a/src/test/test.c b/src/test/test.c index 6ea41b140a..9b474e9e97 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -1660,6 +1660,7 @@ main(int c, const char **v) char *errmsg = NULL; int i, i_out; int loglevel = LOG_ERR; + int accel_crypto = 0; #ifdef USE_DMALLOC { @@ -1682,6 +1683,8 @@ main(int c, const char **v) loglevel = LOG_INFO; } else if (!strcmp(v[i], "--debug")) { loglevel = LOG_DEBUG; + } else if (!strcmp(v[i], "--accel")) { + accel_crypto = 1; } else { v[i_out++] = v[i]; } @@ -1696,7 +1699,7 @@ main(int c, const char **v) } options->command = CMD_RUN_UNITTESTS; - if (crypto_global_init(0, NULL, NULL)) { + if (crypto_global_init(accel_crypto, NULL, NULL)) { printf("Can't initialize crypto subsystem; exiting.\n"); return 1; }