aboutsummaryrefslogtreecommitdiff
path: root/util/trace_logging.h
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2020-04-27 15:08:55 -0700
committerCommit Bot <commit-bot@chromium.org>2020-04-29 18:49:32 +0000
commit56af85f839164f8b6455fd45d9798c0d6e3d1eb6 (patch)
treeb535a9f3be35a12340b9540b84e478ac974c0544 /util/trace_logging.h
parent3c39611e4d88341a71932dd98b9a861d5ce0345d (diff)
downloadopenscreen-56af85f839164f8b6455fd45d9798c0d6e3d1eb6.tar.gz
Improve executable debugging options
Currently, we use the gtest main for both unittests and e2e tests, which means that we don't have access to tracing or verbose logging for those binaries. This patch fixes it by adding a custom test main. This, along with other issues, has resulted in major inconsistencies in the options provided by each of our binaries (osp_demo, e2e_tests, openscreen_unittests, especially), even though they all link against the same platform implementation. This patch attempts to fix some of the more frustrating issues with the options these binaries present, by implementing the following list of fixes: 1. Move to actually honoring trace logging gn arg, and deletion of the features.h header since it is unnecessary. This means our trace logging readme is actually right and you can now actually disable trace logging by setting the gn arg enable_trace_logging = false. 2. Addition of a custom unit test main. If trace logging is enabled, -t will toggle it on. If the platform impl is linked (we MUST know this, as when we are embedded we have no way of setting logging, and this test main should be used both in embedded and not embedded use cases) then the log level may be set to verbose by passing -v. 3. The cast_sender, cast_receiver, and osp_demo binaries are cleaned up to match the flags added to the test main binary. Note that additional cleanup is warranted on the osp_demo to make it more in line with other binaries. Change-Id: I500a46cb118c0721c4c59bd367d3c96d1a542720 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2168547 Commit-Queue: Jordan Bayles <jophba@chromium.org> Reviewed-by: Jordan Bayles <jophba@chromium.org> Reviewed-by: Ryan Keane <rwkeane@google.com>
Diffstat (limited to 'util/trace_logging.h')
-rw-r--r--util/trace_logging.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/util/trace_logging.h b/util/trace_logging.h
index 527bfcb2..84732be2 100644
--- a/util/trace_logging.h
+++ b/util/trace_logging.h
@@ -5,7 +5,6 @@
#ifndef UTIL_TRACE_LOGGING_H_
#define UTIL_TRACE_LOGGING_H_
-#include "build/config/features.h"
#include "platform/base/trace_logging_types.h"
// All compile-time macros for tracing.