Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/46959 )

Change subject: base,tests: Fix trace.test.cc for .fast
......................................................................

base,tests: Fix trace.test.cc for .fast

Due to DPRINTFs compiling in all cases:
https://gem5-review.googlesource.com/c/public/gem5/+/44988,
trace.test.cc failed to compile for the .fast build (`scons
build/NULL/unittests.fast`). This patch fixes this by moving the
DPRINTFs into the `TRACING_ON` compile guards.

Change-Id: Ib37b2d90f19b9dbc1503941d69d5a2dc0c1c9d9b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46959
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Bobby R. Bruce <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/trace.test.cc
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/base/trace.test.cc b/src/base/trace.test.cc
index beefbe4..45e6f6c 100644
--- a/src/base/trace.test.cc
+++ b/src/base/trace.test.cc
@@ -491,19 +491,19 @@
     Trace::enable();
     EXPECT_TRUE(Debug::changeFlag("TraceTestDebugFlag", true));
     EXPECT_TRUE(Debug::changeFlag("FmtFlag", true));
-    DPRINTFS(TraceTestDebugFlag, named_ptr, "Test message");
 #if TRACING_ON
+    DPRINTFS(TraceTestDebugFlag, named_ptr, "Test message");
     ASSERT_EQ(getString(Trace::output()),
         "      0: TraceTestDebugFlag: Foo: Test message");
-#else
-    ASSERT_EQ(getString(Trace::output()), "");
 #endif

     // Flag disabled
     Trace::disable();
     EXPECT_TRUE(Debug::changeFlag("TraceTestDebugFlag", false));
+#if TRACING_ON
     DPRINTFS(TraceTestDebugFlag, named_ptr, "Test message");
     ASSERT_EQ(getString(Trace::output()), "");
+#endif
 }

 /** Test DPRINTFR with tracing on. */

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46959
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib37b2d90f19b9dbc1503941d69d5a2dc0c1c9d9b
Gerrit-Change-Number: 46959
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to