Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/44108 )
Change subject: WIP,sim: Add unit test for Drain
......................................................................
WIP,sim: Add unit test for Drain
Add a unit test for sim/drain.
Change-Id: Ie8a44291a0408090ffbb5b078582d3c5c8d1fd55
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/sim/SConscript
A src/sim/drain.test.cc
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/src/sim/SConscript b/src/sim/SConscript
index 0ce0705..77e7797 100644
--- a/src/sim/SConscript
+++ b/src/sim/SConscript
@@ -50,6 +50,7 @@
Source('cxx_manager.cc')
Source('cxx_config_ini.cc')
Source('debug.cc')
+Source('drain.cc', add_tags='gem5 drain')
Source('py_interact.cc', add_tags='python')
Source('eventq.cc', add_tags='gem5 events')
Source('futex_map.cc')
@@ -64,9 +65,8 @@
Source('redirect_path.cc')
Source('root.cc')
Source('serialize.cc', add_tags='gem5 serialize')
-Source('drain.cc')
Source('se_workload.cc')
-Source('sim_events.cc')
+Source('sim_events.cc', add_tags='gem5 drain')
Source('sim_object.cc')
Source('sub_system.cc')
Source('ticked_object.cc')
@@ -85,10 +85,12 @@
Source('power_domain.cc')
Source('stats.cc')
+tag_implies('gem5 drain', ['gem5 events', 'gem5 trace'])
tag_implies('gem5 events', ['gem5 serialize', 'gem5 trace'])
tag_implies('gem5 serialize', 'gem5 trace')
GTest('byteswap.test', 'byteswap.test.cc', '../base/types.cc')
+GTest('drain.test', 'drain.test.cc', with_tag('gem5 drain'))
GTest('eventq.test', 'eventq.test.cc', with_tag('gem5 events'))
GTest('globals.test', 'globals.test.cc', 'globals.cc',
with_tag('gem5 serialize'))
diff --git a/src/sim/drain.test.cc b/src/sim/drain.test.cc
new file mode 100644
index 0000000..80eecc7
--- /dev/null
+++ b/src/sim/drain.test.cc
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2021 Daniel R. Carvalho
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <gmock/gmock.h>
+#include <gtest/gtest-spi.h>
+#include <gtest/gtest.h>
+
+#include "sim/drain.hh"
+
+TEST(DrainTest, Test)
+{
+}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44108
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: Ie8a44291a0408090ffbb5b078582d3c5c8d1fd55
Gerrit-Change-Number: 44108
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s