diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-02-05 14:28:53 +1100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-02-11 13:41:25 -0500 |
commit | a7a98e27eadff634655a7845976adc7a23dcdc3f (patch) | |
tree | df959fc6b6e41878a96cadb27d6e2f27313b76b5 /src/test/testing_common.c | |
parent | add8acf42882a13af610ace6005d52544509a823 (diff) | |
download | tor-a7a98e27eadff634655a7845976adc7a23dcdc3f.tar.gz tor-a7a98e27eadff634655a7845976adc7a23dcdc3f.zip |
Initialise logging before trying to use it in unit tests
Diffstat (limited to 'src/test/testing_common.c')
-rw-r--r-- | src/test/testing_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c index e20e9e6095..fc4e05c4e8 100644 --- a/src/test/testing_common.c +++ b/src/test/testing_common.c @@ -228,6 +228,9 @@ main(int c, const char **v) int loglevel = LOG_ERR; int accel_crypto = 0; + /* We must initialise logs before we call tor_assert() */ + init_logging(1); + #ifdef USE_DMALLOC { int r = CRYPTO_set_mem_ex_functions(tor_malloc_, tor_realloc_, tor_free_); @@ -239,7 +242,6 @@ main(int c, const char **v) options = options_new(); tor_threads_init(); control_initialize_event_queue(); - init_logging(1); configure_backtrace_handler(get_version()); for (i_out = i = 1; i < c; ++i) { |